1using System.Threading.Tasks;
14 this.account = Account;
18 internal IAccount Account => this.account;
22 return this.accounts.IQ(Type, Id, To, From, Language,
Stanza, Sender);
27 return this.accounts.IQ(Type, Id, To, From, Language, ContentXml, Sender);
32 if (
string.IsNullOrEmpty(Type) || Type ==
"normal" || Type ==
"chat" || Type ==
"headline")
37 bool Forwarded =
false;
39 if (!(Connections is
null) && Connections.Length > 0)
56 if (!Forwarded && Type !=
"headline")
58 if (await this.accounts.Server.PersistenceLayer.StoreOfflineMessage(Type, Id, To, From, Language,
Stanza))
61 await ComLayer.Information(
"Message stored for later delivery.");
63 else if (!(Sender is
null))
64 await (Sender?.MessageErrorServiceUnavailable(From, To,
string.Empty,
string.Empty) ?? Task.CompletedTask);
73 if (
string.IsNullOrEmpty(Type) || Type ==
"normal" || Type ==
"chat" || Type ==
"headline")
78 bool Forwarded =
false;
80 if (!(Connections is
null) && Connections.Length > 0)
90 if (await Connection.
Message(Type, Id, Connection.
Address, From, Language, ContentXml, Sender))
97 if (!Forwarded && Type !=
"headline")
99 if (await this.accounts.Server.PersistenceLayer.StoreOfflineMessage(Type, Id, To, From, Language, ContentXml))
102 await ComLayer.Information(
"Message stored for later delivery.");
104 else if (!(Sender is
null))
105 await (Sender?.MessageErrorServiceUnavailable(From, To,
string.Empty,
string.Empty) ?? Task.CompletedTask);
114 return this.accounts.Presence(Type, Id, To, From, Language,
Stanza, Sender);
119 return this.accounts.Presence(Type, Id, To, From, Language, ContentXml, Sender);
Component managing accounts.
Presence information event arguments.
sbyte Priority
Optional priority.
Contains information about a stanza.
Contains information about one XMPP address.
CaseInsensitiveString BareJid
Bare JID
IClientConnection[] GetClientConnections()
Get active client connections
Interface for observable classes implementing communication protocols.
Interface for XMPP user accounts.
Interface for client connections.
XmppServer Server
XMPP Server
PresenceEventArgs LastPresence
Last presence received.
XmppAddress Address
Full Address
XmppConnectionState State
Connection state.
Interface for recipients of stanzas.
Interface for senders of stanzas.
Task< bool > Message(string Type, string Id, XmppAddress To, XmppAddress From, string Language, string ContentXml)
Message stanza.
XmppConnectionState
State of XMPP connection.