Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/jabglue.c @ 1446:49c8be874344
Add option 'ignore_self_presence'
According to rfc3921bis, the server must broadcast initial presence
to all of the user's available resources. Which means with compliant
servers the users will see their own resource.
When 'ignore_self_presence' is set, the self-presence messages are
filtered out.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 21 Mar 2008 19:27:52 +0100 |
parents | fd09c95bc2b5 |
children | 844410b9b4cc |
comparison
equal
deleted
inserted
replaced
1445:00503a68f431 | 1446:49c8be874344 |
---|---|
2398 xmlnode muc_packet; | 2398 xmlnode muc_packet; |
2399 | 2399 |
2400 rname = strchr(from, JID_RESOURCE_SEPARATOR); | 2400 rname = strchr(from, JID_RESOURCE_SEPARATOR); |
2401 if (rname) rname++; | 2401 if (rname) rname++; |
2402 | 2402 |
2403 if (settings_opt_get_int("ignore_self_presence")) { | |
2404 const char *self_fjid = jid_full(jc->user); | |
2405 if (self_fjid && !strcasecmp(self_fjid, from)) { | |
2406 return; // Ignoring self presence | |
2407 } | |
2408 } | |
2409 | |
2403 r = jidtodisp(from); | 2410 r = jidtodisp(from); |
2404 | 2411 |
2405 // Check for MUC presence packet | 2412 // Check for MUC presence packet |
2406 muc_packet = xml_get_xmlns(xmldata, "http://jabber.org/protocol/muc#user"); | 2413 muc_packet = xml_get_xmlns(xmldata, "http://jabber.org/protocol/muc#user"); |
2407 | 2414 |