aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-10-12 19:23:12 +0200
committerfiaxh <git@lightrise.org>2022-10-12 19:23:12 +0200
commitd4c674284ed4668fe5e2a323e7302856869707a8 (patch)
tree5c06149d585469d81975b658a56e2e302a66cb8c /xmpp-vala/src/module/xep
parenta45280f8dfe45f8908b44cd13996316af44117e9 (diff)
downloaddino-d4c674284ed4668fe5e2a323e7302856869707a8.tar.gz
dino-d4c674284ed4668fe5e2a323e7302856869707a8.zip
Reactions: Fix xml attribute name
Diffstat (limited to 'xmpp-vala/src/module/xep')
-rw-r--r--xmpp-vala/src/module/xep/0444_reactions.vala8
1 files 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<string> 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<MessageStanza> {
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<string> reactions = new ArrayList<string>();
foreach (StanzaNode reaction_node in reactions_node.get_subnodes("reaction", NS_URI)) {
@@ -65,7 +65,7 @@ public class ReceivedPipelineListener : StanzaListener<MessageStanza> {
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;
}