Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/xmpp_helper.c @ 2032:f740c4128f76
Fix receipts handling according to recent XEP updates
* add lm_get_uid() @xmpp_helper.h
* identify receipts by id attribute of 'received' subelement
instead of stanza id
author | Myhailo Danylenko <isbear@ukrpost.net> |
---|---|
date | Sun, 14 Oct 2012 17:39:11 +0200 |
parents | 46a21258ad91 |
children | a37fbc3ac6aa |
line wrap: on
line diff
--- a/mcabber/mcabber/xmpp_helper.c Sat Oct 13 19:53:12 2012 +0200 +++ b/mcabber/mcabber/xmpp_helper.c Sun Oct 14 17:39:11 2012 +0200 @@ -73,7 +73,6 @@ {0, NULL, NULL, NULL, NULL} }; - #ifdef MODULES_ENABLE static GSList *xmpp_additional_features = NULL; static char *ver, *ver_notavail; @@ -105,6 +104,13 @@ } #endif +// The caller must g_free this after use +gchar *lm_get_uid () +{ + static guint xmpp_uid = 0; + return g_strdup_printf ("mc%u", ++xmpp_uid); +} + const gchar* lm_message_node_get_child_value(LmMessageNode *node, const gchar *child) {