From 62302949df953ce2f05e48842b149114243f4bfd Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Thu, 29 Jul 2021 02:01:25 -0500 Subject: [PATCH] Change: (ement-notify) Only run when session hasn't synced yet --- ement-notify.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ement-notify.el b/ement-notify.el index 6f58e43..cfea484 100644 --- a/ement-notify.el +++ b/ement-notify.el @@ -86,8 +86,10 @@ the session (each the respective struct)." (defun ement-notify (event room session) "Send notifications for EVENT in ROOM on SESSION. Calls functions in `ement-notify-functions' if any of -`ement-notify-predicates' return non-nil." - (when (and (cl-loop for pred in ement-notify-predicates +`ement-notify-predicates' return non-nil. Does not do anything +if session hasn't finished initial sync." + (when (and (ement-session-has-synced-p session) + (cl-loop for pred in ement-notify-predicates thereis (funcall pred event room session)) (cl-loop for pred in ement-notify-functions always (funcall pred event room session)))