feat(onebot): add group_name to group message events (#212)
Group message events (message + message_sent) now carry group_name — a non-standard but common OneBot extension. The name comes from the message's own wire field (ResponseGrp field 7, accurate even right after a rename), falling back to the identity group cache, else '' when neither is available. It's resolved in the group-message decoder, where both the wire head and the identity cache are already at hand, so the converter just passes it through (no ConverterContext change). Verified live (tempserver): real inbound group messages from a non-self account carry group_name set to the actual group name.
This commit is contained in:
5 files changed
+15
-3
No files matched your search
@@ -73,6 +73,7 @@ export async function convertGroupMessage(ctx: ConverterContext, event: GroupMes
|
||||
message_id: messageId,
|
||||
message_seq: event.msgSeq,
|
||||
group_id: event.groupId,
|
||||
group_name: event.groupName,
|
||||
user_id: event.senderUin,
|
||||
message: segments,
|
||||
raw_message: segmentsToRawMessage(segments),
|
||||
|
||||
Reference in new issue
Block a user