feat(onebot): report profile like as notify/profile_like

Decode the multiplexed 0x210 subType-39 push: when body.msgContent is a
ProfileLikeTip with inner msgType==0/subType==203, emit notify/profile_like
{operator_id, operator_nick, times}. times is parsed from detail.txt.
Proto shape from NapCat's raw decoder; wiring + decode verified, but the
byte-exact wire is pending a real like capture to confirm.
This commit is contained in:
DrSmoothl committed 2026-07-07 03:05:14 +08:00
1 parent 0d4d58605f
commit 447b40a259
8 files changed
+135 -1

No files matched your search

@@ -8,6 +8,7 @@ import {
import {
convertFriendAdd,
convertFriendInputStatus,
convertFriendProfileLike,
convertFriendPoke,
convertFriendRecall,
convertGroupAdmin,
@@ -83,6 +84,7 @@ const CONVERTERS: ConverterRegistry = {
group_file_upload: convertGroupFileUpload,
friend_add: convertFriendAdd,
friend_input_status: convertFriendInputStatus,
friend_profile_like: convertFriendProfileLike,
group_name_change: convertGroupNameChange,
group_title_change: convertGroupTitleChange,
group_card_change: convertGroupCardChange,
@@ -21,6 +21,7 @@ type FriendInputStatus = Extract<QQEventVariant, { kind: 'friend_input_status' }
type GroupNameChange = Extract<QQEventVariant, { kind: 'group_name_change' }>;
type GroupCardChange = Extract<QQEventVariant, { kind: 'group_card_change' }>;
type GroupTitleChange = Extract<QQEventVariant, { kind: 'group_title_change' }>;
type FriendProfileLike = Extract<QQEventVariant, { kind: 'friend_profile_like' }>;
export function convertGroupMemberJoin(ctx: ConverterContext, event: GroupMemberJoin): JsonObject {
return notice(ctx, event, {
@@ -172,6 +173,18 @@ export function convertGroupCardChange(ctx: ConverterContext, event: GroupCardCh
});
}
export function convertFriendProfileLike(ctx: ConverterContext, event: FriendProfileLike): JsonObject {
// Mirrors NapCat's OB11ProfileLikeEvent: notify/profile_like with the liker's
// uin, nickname and like count.
return notice(ctx, event, {
notice_type: 'notify',
sub_type: 'profile_like',
operator_id: event.operatorUin,
operator_nick: event.operatorNick,
times: event.times,
});
}
export function convertGroupTitleChange(ctx: ConverterContext, event: GroupTitleChange): JsonObject {
// Mirrors NapCat's OB11GroupTitleEvent: notify/title with the recipient's uin
// and the granted title text.
+1
View File
@@ -71,6 +71,7 @@ const NOTICE_KINDS = [
'group_file_upload',
'friend_add',
'friend_input_status',
'friend_profile_like',
'group_name_change',
'group_title_change',
'group_card_change',