// is this a (private) message send from a user in a chat I'm part of?
boolean authorized = this.groupChatCache.containsKey(bareAddress);
if (!authorized) {
RosterEntry entry = this.roster.getEntry(bareAddress);
authorized = entry != null
&& (entry.getType() == ItemType.both
|| entry.getType() == ItemType.from);
}
return authorized;
}