always add self when creating DM portals
Clients will leave rooms automatically when they realize that they aren't actually members of the channel.
This commit is contained in:
@@ -18,6 +18,7 @@ package connector
|
||||
|
||||
import (
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"maunium.net/go/mautrix/bridgev2"
|
||||
"maunium.net/go/mautrix/bridgev2/networkid"
|
||||
)
|
||||
|
||||
@@ -28,3 +29,11 @@ func (d *DiscordClient) makePortalKey(ch *discordgo.Channel, userLoginID network
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (d *DiscordClient) makeEventSender(user *discordgo.User) bridgev2.EventSender {
|
||||
return bridgev2.EventSender{
|
||||
IsFromMe: user.ID == d.Session.State.User.ID,
|
||||
SenderLogin: d.UserLogin.ID,
|
||||
Sender: networkid.UserID(user.ID),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user