From 318d6f3fe632f6ca82cf8c4cc10245b3761edf6f Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 3 Oct 2023 17:22:29 +0300 Subject: [PATCH] Try to avoid syncing other user into DM portals --- portal.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/portal.go b/portal.go index c2b4fac..5175b83 100644 --- a/portal.go +++ b/portal.go @@ -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 {