From d4c674284ed4668fe5e2a323e7302856869707a8 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 12 Oct 2022 19:23:12 +0200 Subject: [PATCH] Reactions: Fix xml attribute name --- xmpp-vala/src/module/xep/0444_reactions.vala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xmpp-vala/src/module/xep/0444_reactions.vala b/xmpp-vala/src/module/xep/0444_reactions.vala index 90d922d1..3501ca42 100644 --- a/xmpp-vala/src/module/xep/0444_reactions.vala +++ b/xmpp-vala/src/module/xep/0444_reactions.vala @@ -13,7 +13,7 @@ public class Module : XmppStreamModule { public void send_reaction(XmppStream stream, Jid jid, string stanza_type, string message_id, Gee.List reactions) { StanzaNode reactions_node = new StanzaNode.build("reactions", NS_URI).add_self_xmlns(); - reactions_node.put_attribute("to", message_id); + reactions_node.put_attribute("id", message_id); foreach (string reaction in reactions) { StanzaNode reaction_node = new StanzaNode.build("reaction", NS_URI); reaction_node.put_node(new StanzaNode.text(reaction)); @@ -53,8 +53,8 @@ public class ReceivedPipelineListener : StanzaListener { StanzaNode? reactions_node = message.stanza.get_subnode("reactions", NS_URI); if (reactions_node == null) return false; - string? to_attribute = reactions_node.get_attribute("to"); - if (to_attribute == null) return false; + string? id_attribute = reactions_node.get_attribute("id"); + if (id_attribute == null) return false; Gee.List reactions = new ArrayList(); foreach (StanzaNode reaction_node in reactions_node.get_subnodes("reaction", NS_URI)) { @@ -65,7 +65,7 @@ public class ReceivedPipelineListener : StanzaListener { reactions.add(reaction); } } - stream.get_module(Module.IDENTITY).received_reactions(stream, message.from, to_attribute, reactions, message); + stream.get_module(Module.IDENTITY).received_reactions(stream, message.from, id_attribute, reactions, message); return false; }