Mercurial > ~mikael > mcabber > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
1581:b29ac1f171ea | 1582:b5861a0fcd30 |
---|---|
2684 JEP_85, | 2684 JEP_85, |
2685 JEP_22 | 2685 JEP_22 |
2686 } which_jep = JEP_none; | 2686 } which_jep = JEP_none; |
2687 | 2687 |
2688 rname = strchr(from, JID_RESOURCE_SEPARATOR); | 2688 rname = strchr(from, JID_RESOURCE_SEPARATOR); |
2689 if (rname) | |
2690 ++rname; | |
2691 else | |
2692 rname = from + strlen(from); | |
2689 bjid = jidtodisp(from); | 2693 bjid = jidtodisp(from); |
2690 sl_buddy = roster_find(bjid, jidsearch, ROSTER_TYPE_USER); | 2694 sl_buddy = roster_find(bjid, jidsearch, ROSTER_TYPE_USER); |
2691 g_free(bjid); | 2695 g_free(bjid); |
2692 | 2696 |
2693 /* XXX Actually that's wrong, since it filters out server "offline" | 2697 /* XXX Actually that's wrong, since it filters out server "offline" |
2694 messages (for JEP-0022). This JEP is (almost) deprecated so | 2698 messages (for JEP-0022). This JEP is (almost) deprecated so |
2695 we don't really care. */ | 2699 we don't really care. */ |
2696 if (!sl_buddy || !rname++) { | 2700 if (!sl_buddy) { |
2697 return; | 2701 return; |
2698 } | 2702 } |
2699 | 2703 |
2700 /* Let's see chich JEP the contact uses. If possible, we'll use | 2704 /* Let's see chich JEP the contact uses. If possible, we'll use |
2701 JEP-85, if not we'll look for JEP-22 support. */ | 2705 JEP-85, if not we'll look for JEP-22 support. */ |