discordid: make function names more explicit

These are fairly wordy but help maintain correctness. A channel portal
ID should not be confused with a guild portal ID.
This commit is contained in:
Skip R
2026-02-13 21:06:37 -08:00
parent 04c15d15a7
commit dfa9c52974
10 changed files with 43 additions and 43 deletions

View File

@@ -148,7 +148,7 @@ func (d *DiscordClient) wrapDiscordMessage(msg *discordgo.Message, typ bridgev2.
DiscordEventMeta: &DiscordEventMeta{
Type: typ,
PortalKey: networkid.PortalKey{
ID: discordid.MakePortalID(msg.ChannelID),
ID: discordid.MakeChannelPortalIDWithID(msg.ChannelID),
Receiver: d.UserLogin.ID,
},
},
@@ -221,7 +221,7 @@ func (d *DiscordClient) wrapDiscordReaction(reaction *discordgo.MessageReaction,
DiscordEventMeta: &DiscordEventMeta{
Type: evtType,
PortalKey: networkid.PortalKey{
ID: discordid.MakePortalID(reaction.ChannelID),
ID: discordid.MakeChannelPortalIDWithID(reaction.ChannelID),
Receiver: d.UserLogin.ID,
},
},
@@ -238,7 +238,7 @@ func (d *DiscordClient) handleDiscordTyping(ctx context.Context, typing *discord
log := zerolog.Ctx(ctx)
portalKey := networkid.PortalKey{
ID: discordid.MakePortalID(typing.ChannelID),
ID: discordid.MakeChannelPortalIDWithID(typing.ChannelID),
Receiver: d.UserLogin.ID,
}
portal, err := d.connector.Bridge.GetExistingPortalByKey(ctx, portalKey)