plugin_e2ee: correctly pass realjid to decrypt call in MUC
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
90242b8243
commit
00a91774fc
1 changed files with 7 additions and 6 deletions
|
@ -378,17 +378,18 @@ class E2EEPlugin(BasePlugin):
|
|||
# fine with this so let them handle it.
|
||||
jid = message['from']
|
||||
|
||||
muctab = None
|
||||
muctab: Optional[MucTab] = None
|
||||
if isinstance(tab, PrivateTab):
|
||||
muctab = tab.parent_muc
|
||||
jid = None
|
||||
|
||||
if isinstance(muctab, MucTab):
|
||||
if muctab is not None or isinstance(tab, MucTab):
|
||||
if muctab is None:
|
||||
muctab = tab # type: ignore
|
||||
nick = message['from'].resource
|
||||
for user in muctab.users:
|
||||
if user.nick == nick:
|
||||
jid = user.jid or None
|
||||
break
|
||||
user = muctab.get_user_by_name(nick) # type: ignore
|
||||
if user is not None:
|
||||
jid = user.jid or None
|
||||
|
||||
self.decrypt(message, jid, tab)
|
||||
|
||||
|
|
Loading…
Reference in a new issue