diff mcabber/src/jabglue.c @ 993:0759f4c7da68

Add option 'disable_chatstates'
author Mikael Berthe <mikael@lilotux.net>
date Wed, 01 Nov 2006 21:36:50 +0100
parents b37348c2aa79
children d0d0cd9e39c4
line wrap: on
line diff
--- a/mcabber/src/jabglue.c	Wed Nov 01 17:47:30 2006 +0100
+++ b/mcabber/src/jabglue.c	Wed Nov 01 21:36:50 2006 +0100
@@ -461,6 +461,10 @@
   }
 
 #if defined JEP0022 || defined JEP0085
+  // If typing notifications are disabled, we can skip all this stuff...
+  if (chatstates_disabled)
+    goto jb_send_msg_no_chatstates;
+
   rname = strchr(jid, JID_RESOURCE_SEPARATOR);
   barejid = jidtodisp(jid);
   sl_buddy = roster_find(barejid, jidsearch, ROSTER_TYPE_USER);
@@ -523,6 +527,7 @@
   }
 #endif
 
+jb_send_msg_no_chatstates:
   xmlnode_put_attrib(x, "id", msgid);
 
   jab_send(jc, x);
@@ -668,7 +673,6 @@
 #ifdef JEP0085
   jep85 = buddy_resource_jep85(buddy, NULL);
   if (jep85 && jep85->support == CHATSTATES_SUPPORT_OK) {
-    // FIXME: compare w/ last state sent...
     jb_send_jep85_chatstate(jid, chatstate);
     return;
   }
@@ -676,7 +680,6 @@
 #ifdef JEP0022
   jep22 = buddy_resource_jep22(buddy, NULL);
   if (jep22 && jep22->support == CHATSTATES_SUPPORT_OK) {
-    // FIXME: compare w/ last state sent...
     jb_send_jep22_event(jid, chatstate);
   }
 #endif