Compare commits
3 Commits
v0.11.0
...
v0.7.2-rc1
| Author | SHA1 | Date | |
|---|---|---|---|
| 69ffdcfed6 | |||
| da72c51644 | |||
| 62efc39eed |
@@ -1,2 +1,2 @@
|
||||
__version__ = "0.7.1"
|
||||
__version__ = "0.7.2rc1"
|
||||
__author__ = "Tulir Asokan <tulir@maunium.net>"
|
||||
|
||||
@@ -421,7 +421,8 @@ class AbstractUser(ABC):
|
||||
f" in unbridged chat {portal.tgid_log}")
|
||||
return
|
||||
|
||||
if self.ignore_incoming_bot_events and self.relaybot and sender.id == self.relaybot.tgid:
|
||||
if ((self.ignore_incoming_bot_events and self.relaybot
|
||||
and sender and sender.id == self.relaybot.tgid)):
|
||||
self.log.debug(f"Ignoring relaybot-sent message %s to %s", update.id, portal.tgid_log)
|
||||
return
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ from telethon.tl.types import (UserProfilePhoto, User, UpdateUserName, PeerUser,
|
||||
from mautrix.appservice import AppService, IntentAPI
|
||||
from mautrix.errors import MatrixRequestError
|
||||
from mautrix.bridge import CustomPuppetMixin
|
||||
from mautrix.types import UserID, SyncToken
|
||||
from mautrix.types import UserID, SyncToken, RoomID
|
||||
from mautrix.util.simple_template import SimpleTemplate
|
||||
|
||||
from .types import TelegramID
|
||||
@@ -320,6 +320,10 @@ class Puppet(CustomPuppetMixin):
|
||||
return True
|
||||
return False
|
||||
|
||||
def default_puppet_should_leave_room(self, room_id: RoomID) -> bool:
|
||||
portal: p.Portal = p.Portal.get_by_mxid(room_id)
|
||||
return portal and not portal.backfilling and portal.peer_type != "user"
|
||||
|
||||
# endregion
|
||||
# region Getters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user