mirror of
https://github.com/Caraxi/mare.server.git
synced 2026-02-19 18:57:43 +01:00
fix group vanity gid cleanup
This commit is contained in:
parent
010fcb0d2e
commit
600bd1893e
1 changed files with 3 additions and 3 deletions
|
|
@ -265,10 +265,10 @@ internal class DiscordBot : IHostedService
|
||||||
private async Task CheckVanityForGroup(RestGuild restGuild, Dictionary<ulong, string> allowedRoleIds, MareDbContext db, Group group, CancellationToken token)
|
private async Task CheckVanityForGroup(RestGuild restGuild, Dictionary<ulong, string> allowedRoleIds, MareDbContext db, Group group, CancellationToken token)
|
||||||
{
|
{
|
||||||
var groupPrimaryUser = group.OwnerUID;
|
var groupPrimaryUser = group.OwnerUID;
|
||||||
var primaryUser = await db.Auth.Include(u => u.User).SingleOrDefaultAsync(u => u.PrimaryUserUID == group.OwnerUID).ConfigureAwait(false);
|
var groupOwner = await db.Auth.Include(u => u.User).SingleOrDefaultAsync(u => u.UserUID == group.OwnerUID).ConfigureAwait(false);
|
||||||
if (primaryUser != null)
|
if (groupOwner != null && !string.IsNullOrEmpty(groupOwner.PrimaryUserUID))
|
||||||
{
|
{
|
||||||
groupPrimaryUser = primaryUser.User.UID;
|
groupPrimaryUser = groupOwner.PrimaryUserUID;
|
||||||
}
|
}
|
||||||
|
|
||||||
var lodestoneUser = await db.LodeStoneAuth.Include(u => u.User).SingleOrDefaultAsync(f => f.User.UID == groupPrimaryUser).ConfigureAwait(false);
|
var lodestoneUser = await db.LodeStoneAuth.Include(u => u.User).SingleOrDefaultAsync(f => f.User.UID == groupPrimaryUser).ConfigureAwait(false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue