Try to avoid syncing other user into DM portals

This commit is contained in:
Tulir Asokan 2023-10-03 17:22:29 +03:00
parent b0a7cbca13
commit 318d6f3fe6

View file

@ -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 {