supportsFeature method
A wrapper function around discoInfoQuery: Returns true if the entity with JID
entity
supports the disco feature feature
. If not, returns false.
Implementation
Future<bool> supportsFeature(JID entity, String feature) async {
final info = await discoInfoQuery(entity);
if (info.isType<StanzaError>()) return false;
return info.get<DiscoInfo>().features.contains(feature);
}