sendInitialPresence method
Sends the initial presence to enable receiving messages.
Implementation
Future<void> sendInitialPresence() async {
final children = List<XMLNode>.from([
XMLNode(
tag: 'show',
text: 'chat',
),
]);
for (final callback in _presenceCallbacks) {
children.addAll(
await callback(),
);
}
final attrs = getAttributes();
await attrs.sendStanza(
StanzaDetails(
Stanza.presence(
children: children,
),
awaitable: false,
addId: false,
),
);
}