feat: essence get_sender

This commit is contained in:
手瓜一十雪 2024-07-20 16:00:01 +08:00
parent 8d18d2ce1f
commit 3f7a85d80b
2 changed files with 6 additions and 3 deletions

View File

@ -487,7 +487,7 @@ export class OB11Constructor {
}
if (grayTipElement.jsonGrayTipElement.busiId == 2401) {
let searchParams = new URL(json[0].jp).searchParams;
let msgSeq = searchParams.get('msgSeq');
let msgSeq = searchParams.get('msgSeq')!;
let Group = searchParams.get('groupCode');
let Businessid = searchParams.get('businessid');
let Peer: Peer = {
@ -495,7 +495,8 @@ export class OB11Constructor {
chatType: ChatType.group,
peerUid: Group!
};
return new OB11GroupEssenceEvent(parseInt(msg.peerUid), msg.id!);
let msgData = await NTQQMsgApi.getMsgsBySeqAndCount(Peer, msgSeq.toString(), 1, true, true);
return new OB11GroupEssenceEvent(parseInt(msg.peerUid), msg.id!, parseInt(msgData.msgList[0].senderUin));
// 获取MsgSeq+Peer可获取具体消息
}
if (grayTipElement.jsonGrayTipElement.busiId == 2407) {

View File

@ -2,11 +2,13 @@ import { OB11GroupNoticeEvent } from './OB11GroupNoticeEvent';
export class OB11GroupEssenceEvent extends OB11GroupNoticeEvent {
notice_type = 'essence';
message_id: number;
sender_id: number;
sub_type: 'add' | 'delete' = "add";
constructor(groupId: number, message_id: number) {
constructor(groupId: number, message_id: number, sender_id: number) {
super();
this.group_id = groupId;
this.message_id = message_id;
this.sender_id = sender_id;
}
}