Compare commits

..

10 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
Tulir Asokan 842d98dc1c Bump version to 0.7.1rc2 2020-01-25 23:37:18 +02:00
Tulir Asokan b7e69ddc61 Fix relaybot messages being allowed through with ignore_own_incoming_events set 2020-01-25 23:36:17 +02:00
Tulir Asokan 82f7905367 Add note to Matrix->Telegram EDU bridging 2020-01-13 20:46:00 +02:00
Tulir Asokan 1d8699054c Merge pull request #409 from cubesky/master
Fix mautrix-python import error.
2020-01-12 23:21:18 +02:00
天空/立音 32c521cb79 Fix mautrix-python import error.
Because of mautrix-python library [API Changes](https://github.com/tulir/mautrix-python/commit/04d2ae4c3d4db5f8798f4f844caafb5d00606507). Database migration script is broken.
2020-01-13 02:46:26 +08:00
6 changed files with 16 additions and 9 deletions
+4 -3
View File
@@ -6,9 +6,9 @@
* [x] Message edits
* [ ] ‡ Message history
* [x] Presence
* [x] Typing notifications
* [x] Read receipts
* [x] Pinning messages
* [x] Typing notifications*
* [x] Read receipts*
* [x] Pinning messages*
* [x] Power level
* [x] Normal chats
* [ ] Non-hardcoded PL requirements
@@ -56,5 +56,6 @@
* [ ] ‡ Secret chats (not yet supported by Telethon)
* [ ] ‡ E2EE in Matrix rooms (not yet supported
\* Requires [double puppeting](https://github.com/tulir/mautrix-telegram/wiki/Authentication#replacing-telegram-accounts-matrix-puppet-with-matrix-account) to be enabled
† Information not automatically sent from source, i.e. implementation may not be possible
‡ Maybe, i.e. this feature may or may not be implemented at some point
+1 -1
View File
@@ -1,2 +1,2 @@
__version__ = "0.7.1rc1"
__version__ = "0.7.2rc1"
__author__ = "Tulir Asokan <tulir@maunium.net>"
+3 -3
View File
@@ -97,7 +97,6 @@ class AbstractUser(ABC):
self.client = None
self.is_relaybot = False
self.is_bot = False
self.relaybot = None
@property
def connected(self) -> bool:
@@ -422,8 +421,9 @@ 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:
self.log.debug(f"Ignoring relaybot-sent message %s to %s", update, portal.tgid_log)
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
if isinstance(update, MessageService):
+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
@@ -24,7 +24,8 @@ def log(message, end="\n"):
def connect(to):
from mautrix.bridge.db import Base, RoomState, UserProfile
from mautrix.util.db import Base
from mautrix.bridge.db import RoomState, UserProfile
from mautrix_telegram.db import (Portal, Message, UserPortal, User, Contact, Puppet, BotChat,
TelegramFile)
@@ -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({