Try to avoid syncing other user into DM portals
This commit is contained in:
@@ -1033,9 +1033,12 @@ func (portal *Portal) syncParticipants(source *User, participants []*discordgo.U
|
|||||||
puppet := portal.bridge.GetPuppetByID(participant.ID)
|
puppet := portal.bridge.GetPuppetByID(participant.ID)
|
||||||
puppet.UpdateInfo(source, participant, nil)
|
puppet.UpdateInfo(source, participant, nil)
|
||||||
|
|
||||||
user := portal.bridge.GetUserByID(participant.ID)
|
var user *User
|
||||||
if user != nil {
|
if participant.ID != portal.OtherUserID {
|
||||||
portal.ensureUserInvited(user, false)
|
user = portal.bridge.GetUserByID(participant.ID)
|
||||||
|
if user != nil {
|
||||||
|
portal.ensureUserInvited(user, false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if user == nil || !puppet.IntentFor(portal).IsCustomPuppet {
|
if user == nil || !puppet.IntentFor(portal).IsCustomPuppet {
|
||||||
|
|||||||
Reference in New Issue
Block a user