Added more fields to LoginAck to reduce web API needs on client.
This commit is contained in:
@ -73,11 +73,21 @@ namespace HermesSocketServer.Socket.Handlers
|
||||
}
|
||||
if (string.IsNullOrEmpty(channel.User.DefaultVoice))
|
||||
_logger.Warning($"No default voice was set for an user [user id: {userId}][api key: {data.ApiKey}]");
|
||||
|
||||
sql = "select \"providerAccountId\" from \"Account\" where \"userId\" = @user and provider = @provider";
|
||||
var result2 = await _database.ExecuteScalar(sql, new Dictionary<string, object>() { { "user", userId }, { "provider", "twitch" } });
|
||||
var providerId = result2?.ToString();
|
||||
if (providerId == null) {
|
||||
_logger.Warning($"Could not find the Provider Account Id [user id: {userId}][provider: twitch]");
|
||||
return;
|
||||
}
|
||||
|
||||
var ack = new LoginAckMessage()
|
||||
{
|
||||
UserId = userId,
|
||||
ProviderAccountId = providerId,
|
||||
SessionId = sender.UID,
|
||||
UserName = channel.User.Name,
|
||||
OwnerId = _configuration.Tts.OwnerId,
|
||||
Admin = sender.Admin,
|
||||
WebLogin = data.WebLogin,
|
||||
|
Reference in New Issue
Block a user