Add missing await
And a safer null check
This commit is contained in:
parent
0d849cf2bb
commit
8fb0e2a101
@ -219,7 +219,7 @@ class Portal(DBPortal, BasePortal):
|
|||||||
if not self.invite_own_puppet_to_pm:
|
if not self.invite_own_puppet_to_pm:
|
||||||
self.log.warning(f"Ignoring message {evt.id}: double puppeting isn't enabled")
|
self.log.warning(f"Ignoring message {evt.id}: double puppeting isn't enabled")
|
||||||
return
|
return
|
||||||
sender = p.Puppet.get_by_mid(evt.sender.id) if not self.is_direct else None
|
sender = await p.Puppet.get_by_mid(evt.sender.id) if evt.sender else None
|
||||||
intent = await self._bridge_own_message_pm(source, sender, f"message {evt.id}")
|
intent = await self._bridge_own_message_pm(source, sender, f"message {evt.id}")
|
||||||
if not intent:
|
if not intent:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user