Diff

mod_pubsub_text_interface/mod_pubsub_text_interface.lua @ 4042:78ac5500a844

mod_pubsub_text_interface: Reflect XEP-0334 hints Helps testing without bothering your other clients.
author Kim Alvefur <zash@zash.se>
date Wed, 10 Jun 2020 12:21:10 +0200
parent 4041:cb5ea9d25cb2
child 4234:f31eac6b2e9c
line wrap: on
line diff
--- a/mod_pubsub_text_interface/mod_pubsub_text_interface.lua	Wed Jun 10 12:15:11 2020 +0200
+++ b/mod_pubsub_text_interface/mod_pubsub_text_interface.lua	Wed Jun 10 12:21:10 2020 +0200
@@ -90,6 +90,14 @@
 		reply:tag("received", { xmlns = "urn:xmpp:receipts", id = stanza.attr.id }):up();
 	end
 
+	if stanza:get_child("no-copy", "urn:xmpp:hints") then
+		reply:tag("no-copy", { xmlns = "urn:xmpp:hints" }):up();
+	end
+
+	if stanza:get_child("no-store", "urn:xmpp:hints") then
+		reply:tag("no-store", { xmlns = "urn:xmpp:hints" }):up();
+	end
+
 	module:send(reply);
 	return true;
 end);