aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-11-21 23:27:27 +0100
committerfiaxh <git@mx.ax.lt>2017-11-22 00:40:41 +0100
commitde133218dab0ac1729dbfc32177979133c15f53b (patch)
tree1cecc41b9f54841dd44cc348a564d9fd7f999f9e /xmpp-vala/src/module/xep/0085_chat_state_notifications.vala
parentf3063f56b7e2ccfef255256d5bf527988fcf2957 (diff)
downloaddino-de133218dab0ac1729dbfc32177979133c15f53b.tar.gz
dino-de133218dab0ac1729dbfc32177979133c15f53b.zip
Disconnect stanza listeners from pipeline
Diffstat (limited to 'xmpp-vala/src/module/xep/0085_chat_state_notifications.vala')
-rw-r--r--xmpp-vala/src/module/xep/0085_chat_state_notifications.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala b/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala
index 3ca97282..e92763fb 100644
--- a/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala
+++ b/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala
@@ -18,6 +18,8 @@ public class Module : XmppStreamModule {
public signal void chat_state_received(XmppStream stream, string jid, string state);
+ private SendPipelineListener send_pipeline_listener = new SendPipelineListener();
+
/**
* "A message stanza that does not contain standard messaging content [...] SHOULD be a state other than <active/>" (0085, 5.6)
*/
@@ -31,12 +33,13 @@ public class Module : XmppStreamModule {
public override void attach(XmppStream stream) {
stream.get_module(ServiceDiscovery.Module.IDENTITY).add_feature(stream, NS_URI);
- stream.get_module(Message.Module.IDENTITY).send_pipeline.connect(new SendPipelineListener());
+ stream.get_module(Message.Module.IDENTITY).send_pipeline.connect(send_pipeline_listener);
stream.get_module(Message.Module.IDENTITY).received_message.connect(on_received_message);
}
public override void detach(XmppStream stream) {
stream.get_module(Message.Module.IDENTITY).received_message.disconnect(on_received_message);
+ stream.get_module(Message.Module.IDENTITY).send_pipeline.disconnect(send_pipeline_listener);
}
public override string get_ns() { return NS_URI; }