From 9fbfe06e64d9509e359bddb5c72538476c874c5a Mon Sep 17 00:00:00 2001 From: "Wesley F. Young" Date: Mon, 18 Aug 2025 10:30:39 +0800 Subject: [PATCH] [Core] Fix the parsing of group invitation event --- .../Context/Logic/Implementation/MessagingLogic.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Lagrange.Core/Internal/Context/Logic/Implementation/MessagingLogic.cs b/Lagrange.Core/Internal/Context/Logic/Implementation/MessagingLogic.cs index 34e0dedb9..9bcac786c 100644 --- a/Lagrange.Core/Internal/Context/Logic/Implementation/MessagingLogic.cs +++ b/Lagrange.Core/Internal/Context/Logic/Implementation/MessagingLogic.cs @@ -71,13 +71,16 @@ public override async Task Incoming(ProtocolEvent e) var chain = push.Chain; // Intercept group invitation - if (chain.Count == 1 && chain[0] is LightAppEntity { AppName: "com.tencent.qun.invite" } app) + if (chain.Count == 1 && chain[0] is LightAppEntity + { + AppName: "com.tencent.qun.invite" or "com.tencent.tuwen.lua" + } app) { using var document = JsonDocument.Parse(app.Payload); var root = document.RootElement; string url = root.GetProperty("meta").GetProperty("news").GetProperty("jumpUrl").GetString() - ?? throw new Exception("sb tx! Is this 'com.tencent.qun.invite'?"); + ?? throw new Exception("sb tx! Is this 'com.tencent.qun.invite' or 'com.tencent.tuwen.lua'?"); var query = HttpUtility.ParseQueryString(new Uri(url).Query); uint groupUin = uint.Parse(query["groupcode"] ?? throw new Exception("sb tx! Is this '/group/invite_join'?"));