diff mcabber/mcabber/xmpp.c @ 2033:a37fbc3ac6aa

Delivery receipts: Use LM-generated messages id
author Mikael Berthe <mikael@lilotux.net>
date Sun, 14 Oct 2012 17:41:56 +0200
parents f740c4128f76
children f8958ab545ac
line wrap: on
line diff
--- a/mcabber/mcabber/xmpp.c	Sun Oct 14 17:39:11 2012 +0200
+++ b/mcabber/mcabber/xmpp.c	Sun Oct 14 17:41:56 2012 +0200
@@ -423,8 +423,7 @@
     lm_message_node_set_attribute(lm_message_node_add_child(x->node, "request",
                                                             NULL),
                                   "xmlns", NS_RECEIPTS);
-    *xep184 = lm_get_uid ();
-    lm_message_node_set_attribute (x->node, "id", (const gchar *)*xep184);
+    *xep184 = g_strdup(lm_message_node_get_attribute(x->node, "id"));
   }
   g_free(barejid);
 
@@ -1356,7 +1355,7 @@
                           lm_message_node_get_attribute(info, "xml:lang"));
         info = info->next;
     }
-    
+
     info = lm_message_node_get_child(query, "feature");
     while (info) {
       if (!g_strcmp0(info->name, "feature"))
@@ -1416,7 +1415,7 @@
 
     if (caps_verify(ver, hash))
       caps_copy_to_persistent(ver, lm_message_node_to_string(query));
-    else 
+    else
       caps_move_to_local(ver, bjid);
   }
 
@@ -2188,7 +2187,7 @@
 
   if (!bookmarks || !bjid)
     return 0;
-  
+
   // Walk through the storage bookmark tags
   for (x = bookmarks->children ; x; x = x->next) {
     // If the node is a conference item, check the jid.