diff --git a/KonataNT/Core/BaseClient.cs b/KonataNT/Core/BaseClient.cs index e45cd8c..f536c7f 100644 --- a/KonataNT/Core/BaseClient.cs +++ b/KonataNT/Core/BaseClient.cs @@ -36,6 +36,8 @@ public class BaseClient internal CacheHandler CacheHandler { get; } + internal PushHandler PushHandler { get; } + internal ILogger Logger { get; init; } internal BaseClient(BotKeystore keystore, BotConfig config) @@ -46,6 +48,7 @@ internal BaseClient(BotKeystore keystore, BotConfig config) EventEmitter = new EventEmitter(this); PacketHandler = new PacketHandler(this); CacheHandler = new CacheHandler(this); + PushHandler = new PushHandler(this); Logger = config.Logger ?? new DefaultLogger(EventEmitter); } diff --git a/KonataNT/Core/PushHandler.cs b/KonataNT/Core/PushHandler.cs new file mode 100644 index 0000000..ab83710 --- /dev/null +++ b/KonataNT/Core/PushHandler.cs @@ -0,0 +1,30 @@ +using KonataNT.Events; + +namespace KonataNT.Core; + +internal class PushHandler +{ + private readonly BaseClient _client; + + private Dictionary> _handlerFunction; + + public PushHandler(BaseClient client) + { + _client = client; + _handlerFunction = new Dictionary> + { + { "trpc.msg.olpush.OlPushService.MsgPush", ParseMsfPush }, + { "trpc.qq_new_tech.status_svc.StatusService.KickNT", ParseMsfKick } + }; + } + + private void ParseMsfPush(byte[] packet) + { + throw new NotImplementedException(); + } + + private void ParseMsfKick(byte[] packet) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/KonataNT/Message/MessageStruct.cs b/KonataNT/Message/MessageStruct.cs index 21396b5..05025b8 100644 --- a/KonataNT/Message/MessageStruct.cs +++ b/KonataNT/Message/MessageStruct.cs @@ -1,5 +1,3 @@ -using KonataNT.Utility; - namespace KonataNT.Message; public class MessageStruct @@ -33,5 +31,6 @@ public MessageStruct(uint uin, string name, DateTime messageTime) { Sender = (uin, name); Time = messageTime.ToUniversalTime(); + Chain = new MessageChain(); } }