Compare commits

...

5 Commits

Author SHA1 Message Date
Tulir Asokan 69ffdcfed6 Bump version to 0.7.2rc1 2020-02-08 13:32:25 +02:00
Tulir Asokan da72c51644 Only leave group chat portals with default puppet. Fixes #418 2020-02-08 13:28:07 +02:00
Tulir Asokan 62efc39eed Fix ignore_incoming_bot_events check in channels
Fixes #417
2020-02-08 13:28:07 +02:00
Tulir Asokan 07edcc4867 Bump version to 0.7.1 2020-02-04 22:31:09 +02:00
Tulir Asokan 65d7934c21 Add missing response to logout provisioning API endpoint 2020-01-28 22:49:48 +02:00
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
__version__ = "0.7.1rc2"
__version__ = "0.7.2rc1"
__author__ = "Tulir Asokan <tulir@maunium.net>"
+2 -1
View File
@@ -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
+5 -1
View File
@@ -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
@@ -355,6 +355,7 @@ class ProvisioningAPI(AuthAPI):
if err is not None:
return err
await user.log_out()
return web.json_response({}, status=200)
async def bridge_info(self, request: web.Request) -> web.Response:
return web.json_response({