discordid: remove all ID-related casts
In the same vein as mautrix-whatsapp, -slack and others, do not make assumptions about how the ID is represented in the connector code. Let the discordid package be entirely responsible.
This commit is contained in:
@@ -24,7 +24,6 @@ import (
|
||||
"github.com/rs/zerolog"
|
||||
"maunium.net/go/mautrix/bridgev2"
|
||||
"maunium.net/go/mautrix/bridgev2/database"
|
||||
"maunium.net/go/mautrix/bridgev2/networkid"
|
||||
|
||||
"go.mau.fi/mautrix-discord/pkg/discordid"
|
||||
)
|
||||
@@ -71,7 +70,7 @@ func (dl *DiscordGenericLogin) FinalizeCreatingLogin(ctx context.Context, token
|
||||
|
||||
dl.Session = session
|
||||
ul, err := dl.User.NewLogin(ctx, &database.UserLogin{
|
||||
ID: networkid.UserLoginID(user.ID),
|
||||
ID: discordid.MakeUserLoginID(user.ID),
|
||||
Metadata: &discordid.UserLoginMetadata{
|
||||
Token: token,
|
||||
HeartbeatSession: session.HeartbeatSession,
|
||||
|
||||
Reference in New Issue
Block a user