From 51821a774fc54be3279cdf56e62b4a09673949e4 Mon Sep 17 00:00:00 2001 From: eta Date: Tue, 1 Sep 2020 20:33:12 +0100 Subject: [PATCH] Bridge through chat state as unavailable presence - Also, fix an error where we'd send a bogus presence if you sent an chat state. --- stuff.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stuff.lisp b/stuff.lisp index 8b744ea..21c2114 100644 --- a/stuff.lisp +++ b/stuff.lisp @@ -1189,6 +1189,7 @@ Returns three values: avatar data (as two values), and a generalized boolean spe ((string= type "composing") :composing) ((string= type "paused") :paused) ((string= type "active") :available) + ((string= type "gone") :unavailable) (t (return-from whatsxmpp-chat-state-handler))))) (unless uid (warn "Got chat state for user that isn't registered") @@ -1199,7 +1200,8 @@ Returns three values: avatar data (as two values), and a generalized boolean spe (warn "Can't send chat state, since user connection is offline") (return-from whatsxmpp-chat-state-handler)) (whatscl::send-presence conn presence-type - (unless (eql presence-type :active) + (unless (or (eql presence-type :available) + (eql presence-type :unavailable)) wa-jid)))))) (defun whatsxmpp-marker-handler (comp &key from to type marker-id id &allow-other-keys)