aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/service/presence_manager.vala12
1 files changed, 12 insertions, 0 deletions
diff --git a/libdino/src/service/presence_manager.vala b/libdino/src/service/presence_manager.vala
index a9dc83aa..65993f88 100644
--- a/libdino/src/service/presence_manager.vala
+++ b/libdino/src/service/presence_manager.vala
@@ -77,6 +77,18 @@ public class PresenceManager : StreamInteractionModule, Object {
if (stream != null) stream.get_module(Xmpp.Presence.Module.IDENTITY).cancel_subscription(stream, jid.bare_jid);
}
+ public void send_presence(string? pres_str){
+ foreach(Account account in stream_interactor.get_accounts()) {
+ XmppStream stream = stream_interactor.get_stream(account);
+ Xmpp.Presence.Stanza presence = new Xmpp.Presence.Stanza();
+ if (pres_str != null) presence.show = pres_str;
+ if (stream != null) {
+ stream.get_module(Xmpp.Presence.Module.IDENTITY).send_presence(stream, presence);
+ }
+ }
+ }
+
+
private void on_account_added(Account account) {
stream_interactor.module_manager.get_module(account, Presence.Module.IDENTITY).received_available_show.connect((stream, jid, show) =>
on_received_available_show(account, jid, show)