diff mod_pubsub_text_interface/mod_pubsub_text_interface.lua @ 3644:9980ea72ff91

mod_pubsub_text_interface: Respond to receipts Because why not?
author Kim Alvefur <zash@zash.se>
date Fri, 09 Aug 2019 19:01:58 +0200
parents 33b3f02a9e7d
children cb5ea9d25cb2
line wrap: on
line diff
--- a/mod_pubsub_text_interface/mod_pubsub_text_interface.lua	Fri Aug 09 19:00:35 2019 +0200
+++ b/mod_pubsub_text_interface/mod_pubsub_text_interface.lua	Fri Aug 09 19:01:58 2019 +0200
@@ -78,6 +78,12 @@
 	else
 		reply:body("Unknown command. `help` to list commands.");
 	end
+	reply:reset();
+
+	if stanza:get_child("request", "urn:xmpp:receipts") then
+		reply:tag("received", { xmlns = "urn:xmpp:receipts", id = stanza.attr.id }):up();
+	end
+
 	module:send(reply);
 	return true;
 end);