fixes for alias display + check aliases on initial uid generation
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user