From 9ff4a88e8489093fe8a12fa54518948a9b3b2ceb Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Mon, 14 Jan 2019 07:16:47 -0600 Subject: [PATCH] Fix: Don't show typing notifications for self --- matrix-client-room.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/matrix-client-room.el b/matrix-client-room.el index e226746..991259c 100644 --- a/matrix-client-room.el +++ b/matrix-client-room.el @@ -681,13 +681,15 @@ Also update prompt with typers." (unless (and (boundp 'tabbar-mode) tabbar-mode) ;; Disable when tabbar mode is on. MAYBE: Remove this. (with-room-buffer room - (pcase-let* (((eieio avatar typers name topic) room) + (pcase-let* (((eieio avatar typers name topic session) room) + ((eieio user) session) (name (when name (propertize name 'face 'font-lock-keyword-face))) (ov (car (ov-in 'matrix-client-prompt))) - (typers-string (s-join ", " (cl-loop for user across typers - collect (matrix-user-displayname room user)))) - (prompt (if (> (length typers) 0) + (typers-string (s-join ", " (cl-loop for typer across typers + unless (string= user typer) + collect (matrix-user-displayname room typer)))) + (prompt (if (s-present? typers-string) (concat (propertize (concat "Typing: " typers-string) 'face 'font-lock-comment-face) "\n" matrix-client-input-prompt)