def check_subdomains(to, from)
      sub1, sub2 = strip_domain(to), strip_domain(from)
      (sub1 == sub2) || cross_domain?(sub1, sub2)
    end
def check_subdomains(to, from)
      sub1, sub2 = strip_domain(to), strip_domain(from)
      (sub1 == sub2) || cross_domain?(sub1, sub2)
    end
Return true if the third-level subdomain JIDs (components and pubsubs)
 are allowed to communicate with each other. For example, a
 tea.wonderland.lit component should be allowed to send messages to
 pubsub.wonderland.lit because they share the second-level wonderland.lit
 domain.