Skip to content

Commit 82c787a

Browse files
committed
[Core] Fix BotGroupNudgeEvent parsing exception in specific scenarios
1 parent 43a7dc8 commit 82c787a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Lagrange.Core/Internal/Logic/Processors/GroupNudgeProcessor.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ namespace Lagrange.Core.Internal.Logic.Processors;
99
[MsgPushProcessor(MsgType.Event0x2DC, 20, true)] // GroupGreyTipNotice20
1010
internal class GroupNudgeProcessor : MsgPushProcessorBase
1111
{
12-
internal override ValueTask<bool> Handle(BotContext context, MsgType msgType, int subType,
13-
PushMessageEvent msgEvt, ReadOnlyMemory<byte>? content)
12+
internal override ValueTask<bool> Handle(BotContext context, MsgType msgType, int subType, PushMessageEvent msgEvt, ReadOnlyMemory<byte>? content)
1413
{
1514
var packet = new BinaryPacket(content!.Value.Span);
1615
long groupUin = packet.Read<int>(); // group uin
@@ -27,7 +26,7 @@ internal override ValueTask<bool> Handle(BotContext context, MsgType msgType, in
2726
context.EventInvoker.PostEvent(new BotGroupNudgeEvent(
2827
groupUin,
2928
long.Parse(@params["uin_str1"]),
30-
@params["action_str"],
29+
@params.TryGetValue("action_str", out string? v) ? v : @params["alt_str1"],
3130
@params["action_img_url"],
3231
long.Parse(@params["uin_str2"]),
3332
@params["suffix_str"]

0 commit comments

Comments
 (0)