Version update check is optional. Removed reliance on web API. Fixed client reconnection due to redemptions.
This commit is contained in:
@ -31,15 +31,4 @@ public class HermesApiClient
|
||||
{
|
||||
return await _web.GetJson<TTSVersion>($"https://{BASE_URL}/api/info/version");
|
||||
}
|
||||
|
||||
public async Task<Account> FetchHermesAccountDetails()
|
||||
{
|
||||
var account = await _web.GetJson<Account>($"https://{BASE_URL}/api/account", new JsonSerializerOptions()
|
||||
{
|
||||
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
|
||||
});
|
||||
if (account == null || account.Id == null || account.Username == null)
|
||||
throw new NullReferenceException("Invalid value found while fetching for hermes account data.");
|
||||
return account;
|
||||
}
|
||||
}
|
@ -41,6 +41,9 @@ namespace TwitchChatTTS.Hermes.Socket.Handlers
|
||||
}
|
||||
|
||||
_user.HermesUserId = message.UserId;
|
||||
_user.HermesUsername = message.UserName;
|
||||
_user.TwitchUsername = message.UserName;
|
||||
_user.TwitchUserId = long.Parse(message.ProviderAccountId);
|
||||
_user.OwnerId = message.OwnerId;
|
||||
_user.DefaultTTSVoice = message.DefaultTTSVoice;
|
||||
_user.VoicesAvailable = new ConcurrentDictionary<string, string>(message.TTSVoicesAvailable);
|
||||
|
Reference in New Issue
Block a user