@@ -27,7 +27,7 @@ public async ValueTask Incoming(ProtocolEvent e)
2727 case Type . TempMessage :
2828 {
2929 var message = await context . EventContext . GetLogic < MessagingLogic > ( ) . Parse ( messageEvent . MsgPush . CommonMessage ) ;
30- if ( message . Entities [ 0 ] is LightAppEntity { AppName : "com.tencent.qun.invite" } || message . Entities [ 0 ] is LightAppEntity { AppName : "com.tencent.tuwen.lua" } )
30+ if ( message . Entities [ 0 ] is LightAppEntity { AppName : "com.tencent.qun.invite" } || message . Entities [ 0 ] is LightAppEntity { AppName : "com.tencent.tuwen.lua" } )
3131 {
3232 var app = ( LightAppEntity ) message . Entities [ 0 ] ;
3333 using var document = JsonDocument . Parse ( app . Payload ) ;
@@ -152,8 +152,8 @@ public async ValueTask Incoming(ProtocolEvent e)
152152 var pkgType210 = ( Event0x210SubType ) messageEvent . MsgPush . CommonMessage . ContentHead . SubType ;
153153 switch ( pkgType210 )
154154 {
155- case Event0x210SubType . FriendRequestNotice
156- when messageEvent . MsgPush . CommonMessage . MessageBody . MsgContent is { } content :
155+ case Event0x210SubType . FriendRequestNotice when messageEvent . MsgPush . CommonMessage . MessageBody . MsgContent is { } content :
156+ {
157157 var friendRequest = ProtoHelper . Deserialize < FriendRequest > ( content . Span ) ;
158158 context . EventInvoker . PostEvent ( new BotFriendRequestEvent (
159159 friendRequest . Info ! . SourceUid ,
@@ -162,6 +162,12 @@ public async ValueTask Incoming(ProtocolEvent e)
162162 friendRequest . Info . Source ?? string . Empty
163163 ) ) ;
164164 break ;
165+ }
166+ default :
167+ {
168+ context . LogWarning ( nameof ( PushLogic ) , "Unknown 0x210 sub type: {0}" , null , pkgType210 ) ;
169+ break ;
170+ }
165171 }
166172
167173 break ;
@@ -195,6 +201,40 @@ public async ValueTask Incoming(ProtocolEvent e)
195201 }
196202 break ;
197203 }
204+ case Event0x2DCSubType . SubType16 when messageEvent . MsgPush . CommonMessage . MessageBody . MsgContent is { } content :
205+ {
206+ var reader = new BinaryPacket ( content ) ;
207+ // group uin and 1 byte
208+ reader . Skip ( 4 + 1 ) ;
209+ var proto = reader . ReadBytes ( Prefix . Int16 | Prefix . LengthOnly ) ;
210+ var body = ProtoHelper . Deserialize < NotifyMessageBody > ( proto ) ;
211+
212+ switch ( ( Event0x2DCSubType16SubType ) body . SubType )
213+ {
214+ case Event0x2DCSubType16SubType . GroupReactionNotice :
215+ {
216+ var reaction = body . Reaction . Data . Data ;
217+
218+ long @operator = context . CacheContext . ResolveUin ( reaction . Data . OperatorUid ) ;
219+
220+ context . EventInvoker . PostEvent ( new BotGroupReactionEvent (
221+ body . GroupUin ,
222+ reaction . Target . Sequence ,
223+ @operator ,
224+ reaction . Data . Type == 1 ,
225+ reaction . Data . Code ,
226+ reaction . Data . CurrentCount
227+ ) ) ;
228+ break ;
229+ }
230+ default :
231+ {
232+ context . LogWarning ( nameof ( PushLogic ) , "Unknown 0x2DCSub16 sub type: {0}" , null , body . SubType ) ;
233+ break ;
234+ }
235+ }
236+ break ;
237+ }
198238 default :
199239 {
200240 context . LogWarning ( nameof ( PushLogic ) , "Unknown 0x2DC sub type: {0}" , null , pkgType ) ;
@@ -244,14 +284,11 @@ private enum Event0x2DCSubType
244284 GroupGreyTipNotice20 = 20 ,
245285 }
246286
247- private enum Event0x2DCSubType16Field13
287+ private enum Event0x2DCSubType16SubType
248288 {
249- GroupMemberSpecialTitleNotice = 6 ,
250- GroupNameChangeNotice = 12 ,
251- GroupTodoNotice = 23 ,
252289 GroupReactionNotice = 35 ,
253290 }
254-
291+
255292 private enum Event0x210SubType
256293 {
257294 FriendRequestNotice = 35 ,
0 commit comments