diff mcabber/src/jabglue.c @ 1582:b5861a0fcd30

Handle chat notifications even if the JID has no resource
author franky
date Mon, 20 Apr 2009 19:58:06 +0200
parents 5bb4b580f229
children 1802b926e3fa
line wrap: on
line diff
--- a/mcabber/src/jabglue.c	Sat Apr 18 12:00:16 2009 +0200
+++ b/mcabber/src/jabglue.c	Mon Apr 20 19:58:06 2009 +0200
@@ -2686,6 +2686,10 @@
   } which_jep = JEP_none;
 
   rname = strchr(from, JID_RESOURCE_SEPARATOR);
+  if (rname)
+    ++rname;
+  else
+    rname = from + strlen(from);
   bjid  = jidtodisp(from);
   sl_buddy = roster_find(bjid, jidsearch, ROSTER_TYPE_USER);
   g_free(bjid);
@@ -2693,7 +2697,7 @@
   /* XXX Actually that's wrong, since it filters out server "offline"
      messages (for JEP-0022).  This JEP is (almost) deprecated so
      we don't really care. */
-  if (!sl_buddy || !rname++) {
+  if (!sl_buddy) {
     return;
   }