--- a/mcabber/mcabber/screen.c Sun Oct 14 18:06:50 2012 +0200
+++ b/mcabber/mcabber/screen.c Mon Oct 15 19:53:02 2012 +0200
@@ -2250,7 +2250,7 @@
void scr_remove_receipt_flag(const char *bjid, gconstpointer xep184)
{
winbuf *win_entry = scr_search_window(bjid, FALSE);
- if (win_entry) {
+ if (win_entry && xep184) {
hbuf_remove_receipt(win_entry->bd->hbuf, xep184);
if (chatmode && (buddy_search_jid(bjid) == current_buddy))
scr_update_buddy_window();
--- a/mcabber/mcabber/xmpp.c Sun Oct 14 18:06:50 2012 +0200
+++ b/mcabber/mcabber/xmpp.c Mon Oct 15 19:53:02 2012 +0200
@@ -423,7 +423,7 @@
lm_message_node_set_attribute(lm_message_node_add_child(x->node, "request",
NULL),
"xmlns", NS_RECEIPTS);
- *xep184 = g_strdup(lm_message_node_get_attribute(x->node, "id"));
+ *xep184 = g_strdup(lm_message_get_id(x));
}
g_free(barejid);
@@ -1297,6 +1297,10 @@
if (received && !g_strcmp0(lm_message_node_get_attribute(received, "xmlns"), NS_RECEIPTS)) {
char *jid = jidtodisp(from);
const char *id = lm_message_node_get_attribute(received, "id");
+ // This is for backward compatibility; if the remote client didn't add
+ // the id as an attribute of the 'received' tag, we use the message id:
+ if (!id)
+ id = lm_message_get_id(m);
scr_remove_receipt_flag(jid, id);
g_free(jid);
}