From 99df4a56fe0220cd37db17761a20f9159ce28f32 Mon Sep 17 00:00:00 2001 From: eta Date: Sat, 1 Aug 2020 17:54:37 +0100 Subject: [PATCH] Don't differentiate between account and resource in disco#info - So the entity caps stuff didn't actually work, because we don't implement XEP-0030 properly and don't honour the "node" attribute on the query. - To hack around this, we misimplement XEP-0030 some more, and always return the bridged user disco info list, even if they ask for the bare JID instead of the full JID. That way, the caps stuff works as it should. --- stuff.lisp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stuff.lisp b/stuff.lisp index 3c3cb2d..422efcd 100644 --- a/stuff.lisp +++ b/stuff.lisp @@ -44,7 +44,7 @@ ,@(multiple-value-bind (to-hostname to-localpart to-resource) (parse-jid to) - (declare (ignore to-hostname)) + (declare (ignore to-hostname to-resource)) (let* ((uid (get-user-id from)) (user-name (get-contact-name uid to-localpart)) (chat-subject (get-user-chat-subject uid to-localpart))) @@ -53,9 +53,7 @@ `((disco-identity "whatsxmpp bridge" "xmpp" "gateway") (disco-feature ,+disco-items-ns+) (disco-feature ,+muc-ns+))) - ((and user-name (not to-resource)) - `((disco-identity ,user-name "registered" "account"))) - ((and user-name (equal to-resource "whatsapp")) + (user-name +whatsapp-user-disco-info-list+) (chat-subject `((disco-identity ,chat-subject "text" "conference")