mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-15 06:04:16 +01:00
fixes for alias display + check aliases on initial uid generation
This commit is contained in:
parent
d656513f47
commit
09b305fa67
2 changed files with 2 additions and 2 deletions
|
|
@ -113,7 +113,7 @@ namespace MareSynchronosServer.Hubs
|
||||||
userToOther.UserUID == userid
|
userToOther.UserUID == userid
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
otherEntry.OtherUser.Alias,
|
userToOther.OtherUser.Alias,
|
||||||
userToOther.IsPaused,
|
userToOther.IsPaused,
|
||||||
OtherIsPaused = otherEntry != null && otherEntry.IsPaused,
|
OtherIsPaused = otherEntry != null && otherEntry.IsPaused,
|
||||||
userToOther.OtherUserUID,
|
userToOther.OtherUserUID,
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ public class DiscordBot : IHostedService
|
||||||
while (!hasValidUid)
|
while (!hasValidUid)
|
||||||
{
|
{
|
||||||
var uid = GenerateRandomString(10);
|
var uid = GenerateRandomString(10);
|
||||||
if (db.Users.Any(u => u.UID == uid)) continue;
|
if (db.Users.Any(u => u.UID == uid || u.Alias == uid)) continue;
|
||||||
user.UID = uid;
|
user.UID = uid;
|
||||||
hasValidUid = true;
|
hasValidUid = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue