bareCompare method
Compares the JID with other
. This function assumes that JID and other
are bare, i.e. only the domain- and localparts are compared. If ensureBare
is optionally set to true, then other
MUST be bare. Otherwise, false is returned.
Implementation
bool bareCompare(JID other, {bool ensureBare = false}) {
if (ensureBare && !other.isBare()) return false;
return local == other.local && domain == other.domain;
}