Ignore:
Timestamp:
2015-02-21T06:16:05Z (9 years ago)
Author:
dequis <dx@…>
Children:
0e4c3dd
Parents:
eee3a5a
git-author:
dequis <dx@…> (24-07-14 10:41:47)
git-committer:
dequis <dx@…> (21-02-15 06:16:05)
Message:

jabber: Improve handling of unknown "from" in chats [v2]

Try a bit harder to detect the source of the message, and fall back to
messages sent from a fake temporary user.

Also fix receiving channel topic when it was set by someone who left the
room.

Also add jabber_get_bare_jid()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber_util.c

    reee3a5a r59c1fe7  
    819819        return TRUE;
    820820}
     821
     822/* Returns new reference! g_free() afterwards. */
     823char *jabber_get_bare_jid(char *jid)
     824{
     825        char *s = NULL;
     826
     827        if (jid == NULL) {
     828                return NULL;
     829        }
     830
     831        if ((s = strchr(jid, '/'))) {
     832                return g_strndup(jid, s - jid);
     833        } else {
     834                return g_strdup(jid);
     835        }
     836}
Note: See TracChangeset for help on using the changeset viewer.