feat: link discord account to existing account

This commit is contained in:
sam 2024-11-03 13:53:16 +01:00
parent c4cb08cdc1
commit 201c56c3dd
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
12 changed files with 333 additions and 14 deletions

View file

@ -72,8 +72,9 @@ public class UserRendererService(
a.Id,
a.AuthType,
a.RemoteId,
a.RemoteUsername,
a.FediverseApplication?.Domain
a.FediverseApplication != null
? $"@{a.RemoteUsername}@{a.FediverseApplication.Domain}"
: a.RemoteUsername
))
: null,
tokenHidden ? user.ListHidden : null,
@ -130,9 +131,7 @@ public class UserRendererService(
[property: JsonConverter(typeof(ScreamingSnakeCaseEnumConverter))] AuthType Type,
string RemoteId,
[property: JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
string? RemoteUsername,
[property: JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
string? FediverseInstance
string? RemoteUsername
);
public record PartialUser(