# HG changeset patch # User Goffi # Date 1577736201 -3600 # Node ID 63cdabdd032eefc0f8f49369af4f016fa06cd0c4 # Parent d4883f9576db3fe804d1509ab0cab0f39eb9b41f chat: show encryption button with group chats: If the group chat use real jids, an encryption button is shown, displaying only non directed encryption plugins (as directed encryption plugins can't be used with MUCs). diff -r d4883f9576db -r 63cdabdd032e cagou/plugins/plugin_wid_chat.py --- a/cagou/plugins/plugin_wid_chat.py Sun Dec 29 17:36:50 2019 +0100 +++ b/cagou/plugins/plugin_wid_chat.py Mon Dec 30 21:03:21 2019 +0100 @@ -289,6 +289,9 @@ ) self.add_widget(btn) for plugin in G.host.encryption_plugins: + if chat.type == C.CHAT_GROUP and plugin["directed"]: + # directed plugins can't work with group chat + continue btn = EncryptionButton( text=plugin['name'], trust_button=True, @@ -426,7 +429,7 @@ cagou_widget.CagouWidget.__init__(self) transfer_btn = TransferButton(chat=self) self.headerInputAddExtra(transfer_btn) - if type_ == C.CHAT_ONE2ONE: + if (type_ == C.CHAT_ONE2ONE or "REALJID_PUBLIC" in statuses): self.encryption_btn = EncryptionMainButton(self) self.headerInputAddExtra(self.encryption_btn) self.extra_menu = ExtraMenu(chat=self)