def allowed?
      stream.config.allowed?(validate_to || stream.domain, stream.user.jid)
    end
def allowed?
      stream.config.allowed?(validate_to || stream.domain, stream.user.jid)
    end
Return true if the to and from JIDs are allowed to communicate with one
 another based on the cross_domain_messages setting in conf/config.rb. If
 a domain's users are isolated to sending messages only within their own
 domain, pubsub stanzas must not be processed from remote JIDs.