From 0e382595840af8e23f797bb78278a171e560f83c Mon Sep 17 00:00:00 2001 From: eta Date: Wed, 16 Sep 2020 13:47:16 +0100 Subject: [PATCH] Add debugging command to force chat metadata refresh --- stuff.lisp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stuff.lisp b/stuff.lisp index f2272ad..9d538a5 100644 --- a/stuff.lisp +++ b/stuff.lisp @@ -960,6 +960,14 @@ Returns three values: avatar data (as two values), and a generalized boolean spe for (localpart . subject) in chats do (request-wa-chat-metadata comp conn stripped localpart))) (reply "You're not connected to WhatsApp.")))) + ((uiop:string-prefix-p "refresh-chat " body) + (let ((conn (gethash stripped (component-whatsapps comp))) + (localpart-to-use (subseq body #.(length "refresh-chat ")))) + (if conn + (progn + (reply (format nil "Refreshing metadata for ~A..." localpart-to-use)) + (request-wa-chat-metadata comp conn stripped localpart-to-use)) + (reply "You're not connected to WhatsApp.")))) (t (reply "Unknown command. Try `help` for a list of supported commands."))))))