From 97575e5095b00c066676a8ecd8f1fed4327613c9 Mon Sep 17 00:00:00 2001 From: wurstsalat Date: Mon, 20 Feb 2023 20:18:19 +0100 Subject: [PATCH] [acronyms_expander] 1.4.7 --- acronyms_expander/acronyms_expander.py | 5 ++++- acronyms_expander/plugin-manifest.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/acronyms_expander/acronyms_expander.py b/acronyms_expander/acronyms_expander.py index 49e974a..bd27934 100644 --- a/acronyms_expander/acronyms_expander.py +++ b/acronyms_expander/acronyms_expander.py @@ -99,6 +99,10 @@ class AcronymsExpanderPlugin(GajimPlugin): buffer_: Gtk.TextBuffer ) -> None: + if self._contact is None: + # If no chat has been activated yet + return + if self._replace_in_progress: return @@ -132,7 +136,6 @@ class AcronymsExpanderPlugin(GajimPlugin): # Get last word and cut invoker last_word = word_start_iter.get_slice(insert_iter) - assert self._contact is not None if isinstance(self._contact, GroupchatContact): if last_word in self._contact.get_user_nicknames(): log.info('Groupchat participant has same nick as acronym') diff --git a/acronyms_expander/plugin-manifest.json b/acronyms_expander/plugin-manifest.json index 7ef627e..31d1d70 100644 --- a/acronyms_expander/plugin-manifest.json +++ b/acronyms_expander/plugin-manifest.json @@ -17,5 +17,5 @@ "gajim>=1.5.0" ], "short_name": "acronyms_expander", - "version": "1.4.6" + "version": "1.4.7" } \ No newline at end of file