mod_presence: Revert empty 'to' attribute of presence before presence/initial event (fixes #1296) 0.11
authorKim Alvefur <zash@zash.se>
Thu, 17 Jan 2019 01:04:39 +0100
branch0.11
changeset 9792 f47b2ab877d0
parent 9781 2e07d2f71599
child 9793 abd32bc33a9c
mod_presence: Revert empty 'to' attribute of presence before presence/initial event (fixes #1296)
plugins/mod_presence.lua
--- a/plugins/mod_presence.lua	Thu Jan 10 13:07:22 2019 +0100
+++ b/plugins/mod_presence.lua	Thu Jan 17 01:04:39 2019 +0100
@@ -63,6 +63,7 @@
 			core_post_stanza(origin, stanza, true);
 		end
 	end
+	stanza.attr.to = nil;
 	if stanza.attr.type == nil and not origin.presence then -- initial presence
 		module:fire_event("presence/initial", { origin = origin, stanza = stanza } );
 		origin.presence = stanza; -- FIXME repeated later