forked from mirror/mautrix-discord
Try to avoid syncing other user into DM portals
This commit is contained in:
parent
b0a7cbca13
commit
318d6f3fe6
1 changed files with 6 additions and 3 deletions
|
@ -1033,9 +1033,12 @@ func (portal *Portal) syncParticipants(source *User, participants []*discordgo.U
|
|||
puppet := portal.bridge.GetPuppetByID(participant.ID)
|
||||
puppet.UpdateInfo(source, participant, nil)
|
||||
|
||||
user := portal.bridge.GetUserByID(participant.ID)
|
||||
if user != nil {
|
||||
portal.ensureUserInvited(user, false)
|
||||
var user *User
|
||||
if participant.ID != portal.OtherUserID {
|
||||
user = portal.bridge.GetUserByID(participant.ID)
|
||||
if user != nil {
|
||||
portal.ensureUserInvited(user, false)
|
||||
}
|
||||
}
|
||||
|
||||
if user == nil || !puppet.IntentFor(portal).IsCustomPuppet {
|
||||
|
|
Loading…
Reference in a new issue