Allow inviting Matrix users into portal rooms
This commit is contained in:
@@ -77,12 +77,13 @@ The bridge does not do this automatically.
|
||||
* [x] Normal chats
|
||||
* [ ] Supergroups/channels (currently only creator level bridged)
|
||||
* [ ] Membership actions
|
||||
* [x] Inviting puppets
|
||||
* [ ] Inviting Matrix users who have logged in to Telegram
|
||||
* [x] Inviting
|
||||
* [x] Puppets
|
||||
* [x] Matrix users who have logged into Telegram
|
||||
* [x] Kicking
|
||||
* [ ] Joining
|
||||
* [ ] Chat name as alias
|
||||
* [ ] Chat invite link as alias
|
||||
* [ ] (Maybe) Chat invite link as alias
|
||||
* [x] Leaving
|
||||
* [x] Room metadata changes (name, topic, avatar)
|
||||
* [x] Initial room metadata
|
||||
|
||||
@@ -88,11 +88,19 @@ class MatrixHandler:
|
||||
elif user == self.az.bot_mxid:
|
||||
self.az.intent.join_room(room)
|
||||
return
|
||||
|
||||
puppet = Puppet.get_by_mxid(user)
|
||||
if puppet:
|
||||
self.handle_puppet_invite(room, puppet, inviter)
|
||||
return
|
||||
# These can probably be ignored
|
||||
|
||||
user = User.get_by_mxid(user, create=False)
|
||||
portal = Portal.get_by_mxid(room)
|
||||
if user and user.has_full_access and portal:
|
||||
portal.invite_telegram(inviter, user)
|
||||
return
|
||||
|
||||
# The rest can probably be ignored
|
||||
self.log.debug(f"{inviter} invited {user} to {room}")
|
||||
|
||||
def handle_join(self, room, user):
|
||||
|
||||
Reference in New Issue
Block a user