aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0085_chat_state_notifications.vala
diff options
context:
space:
mode:
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; }