Skip to content

Commit

Permalink
forgot linters
Browse files Browse the repository at this point in the history
  • Loading branch information
Syndace committed Oct 19, 2024
1 parent 1e12704 commit 85e1d54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slixmpp_omemo/xep_0384.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from slixmpp.jid import JID
from slixmpp.plugins.base import BasePlugin
from slixmpp.plugins.xep_0004 import Form # type: ignore[attr-defined]
from slixmpp.plugins.xep_0045 import XEP_0045
from slixmpp.plugins.xep_0045 import XEP_0045 # type: ignore[attr-defined]
from slixmpp.plugins.xep_0060 import XEP_0060 # type: ignore[attr-defined]
from slixmpp.plugins.xep_0163 import XEP_0163
from slixmpp.roster import RosterNode # type: ignore[attr-defined]
Expand Down Expand Up @@ -1048,10 +1048,10 @@ async def decrypt_message(self, stanza: Message) -> Tuple[Message, DeviceInforma
sender_bare_jid: str

if stanza.get_type() == "groupchat":
if not "xep_0045" in xmpp:
xep_0045: Optional[XEP_0045] = xmpp.get("xep_0045", None)
if xep_0045 is None:
raise ValueError("Attempt to decrypt groupchat message but XEP-0045 is not loaded")

xep_0045: XEP_0045 = xmpp["xep_0045"]
real_jid = xep_0045.get_jid_property(JID(from_jid.bare), from_jid.resource, "jid")
if real_jid is None:
raise SenderNotFound(f"Couldn't find real JID of sender from groupchat JID {from_jid}")
Expand Down

0 comments on commit 85e1d54

Please sign in to comment.