disco: Force calculated caps in outgoing presence

Thu, 22 Oct 2020 13:54:46 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 22 Oct 2020 13:54:46 +0100
changeset 429
46897d7769c3
parent 426
9813b17ee096
child 430
b1f7214c6ec2

disco: Force calculated caps in outgoing presence

plugins/disco.lua file | annotate | diff | comparison | revisions
--- a/plugins/disco.lua	Mon Jun 17 12:32:00 2019 +0100
+++ b/plugins/disco.lua	Thu Oct 22 13:54:46 2020 +0100
@@ -328,9 +328,8 @@
 	end, 50);
 
 	stream:hook("presence-out", function (presence)
-		if not presence:get_child("c", xmlns_caps) then
-			presence:reset():add_child(stream:caps()):reset();
-		end
+		presence:remove_children("c", xmlns_caps);
+		presence:reset():add_child(stream:caps()):reset();
 	end, 10);
 end
 

mercurial