Changeset

429:46897d7769c3

disco: Force calculated caps in outgoing presence
author Matthew Wild <mwild1@gmail.com>
date Thu, 22 Oct 2020 13:54:46 +0100
parents 426:9813b17ee096
children 430:b1f7214c6ec2
files plugins/disco.lua
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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