mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Ignore null MOTDs
This commit is contained in:
@@ -452,8 +452,11 @@ public class ChatClient
|
|||||||
|
|
||||||
private void WsMotd(ResponseMessage message)
|
private void WsMotd(ResponseMessage message)
|
||||||
{
|
{
|
||||||
var msg = JsonSerializer.Deserialize<JsonElement>(message.Text!).GetProperty("motd")
|
var motdElement = JsonSerializer.Deserialize<JsonElement>(message.Text!).GetProperty("motd");
|
||||||
.Deserialize<MessagesJsonModel.MessageModel>();
|
//.Deserialize<MessagesJsonModel.MessageModel>();
|
||||||
|
|
||||||
|
if (motdElement.ValueKind == JsonValueKind.Null) return;
|
||||||
|
var msg = motdElement.Deserialize<MessagesJsonModel.MessageModel>();
|
||||||
|
|
||||||
var model = new MessageModel
|
var model = new MessageModel
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user