Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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'?"));
Expand Down