mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
chore: 废弃无用代码
This commit is contained in:
@@ -618,9 +618,28 @@ export enum GrayTipElementSubType {
|
|||||||
INVITE_NEW_MEMBER = 12,
|
INVITE_NEW_MEMBER = 12,
|
||||||
MEMBER_NEW_TITLE = 17
|
MEMBER_NEW_TITLE = 17
|
||||||
}
|
}
|
||||||
|
export enum NTGrayTipElementSubTypeV2 {
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_AIOOP = 15,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_BLOCK = 14,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_BUDDY = 5,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_BUDDYNOTIFY = 9,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_EMOJIREPLY = 3,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_ESSENCE = 7,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_FEED = 6,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_FEEDCHANNELMSG = 11,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_FILE = 10,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_GROUP = 4,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_GROUPNOTIFY = 8,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_JSON = 17,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_LOCALMSG = 13,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_PROCLAMATION = 2,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_REVOKE = 1,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_UNKNOWN = 0,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_WALLET = 16,
|
||||||
|
GRAYTIP_ELEMENT_SUBTYPE_XMLMSG = 12,
|
||||||
|
}
|
||||||
export interface GrayTipElement {
|
export interface GrayTipElement {
|
||||||
subElementType: GrayTipElementSubType;
|
subElementType: NTGrayTipElementSubTypeV2;
|
||||||
revokeElement: {
|
revokeElement: {
|
||||||
operatorRole: string;
|
operatorRole: string;
|
||||||
operatorUid: string;
|
operatorUid: string;
|
||||||
|
@@ -15,9 +15,9 @@ import {
|
|||||||
FaceIndex,
|
FaceIndex,
|
||||||
Friend,
|
Friend,
|
||||||
FriendV2,
|
FriendV2,
|
||||||
GrayTipElementSubType,
|
|
||||||
Group,
|
Group,
|
||||||
GroupMember,
|
GroupMember,
|
||||||
|
NTGrayTipElementSubTypeV2,
|
||||||
Peer,
|
Peer,
|
||||||
RawMessage,
|
RawMessage,
|
||||||
SelfInfo,
|
SelfInfo,
|
||||||
@@ -377,7 +377,7 @@ export class OB11Constructor {
|
|||||||
}
|
}
|
||||||
for (const element of msg.elements) {
|
for (const element of msg.elements) {
|
||||||
if (element.grayTipElement) {
|
if (element.grayTipElement) {
|
||||||
if (element.grayTipElement.subElementType == GrayTipElementSubType.MEMBER_NEW_TITLE) {
|
if (element.grayTipElement.subElementType == NTGrayTipElementSubTypeV2.GRAYTIP_ELEMENT_SUBTYPE_JSON) {
|
||||||
const json = JSON.parse(element.grayTipElement.jsonGrayTipElement.jsonStr);
|
const json = JSON.parse(element.grayTipElement.jsonGrayTipElement.jsonStr);
|
||||||
|
|
||||||
if (element.grayTipElement.jsonGrayTipElement.busiId == 1061) {
|
if (element.grayTipElement.jsonGrayTipElement.busiId == 1061) {
|
||||||
@@ -398,7 +398,7 @@ export class OB11Constructor {
|
|||||||
}
|
}
|
||||||
//下面得改 上面也是错的grayTipElement.subElementType == GrayTipElementSubType.MEMBER_NEW_TITLE
|
//下面得改 上面也是错的grayTipElement.subElementType == GrayTipElementSubType.MEMBER_NEW_TITLE
|
||||||
}
|
}
|
||||||
if (element.grayTipElement.subElementType == GrayTipElementSubType.INVITE_NEW_MEMBER) {
|
if (element.grayTipElement.subElementType == NTGrayTipElementSubTypeV2.GRAYTIP_ELEMENT_SUBTYPE_XMLMSG) {
|
||||||
//好友添加成功事件
|
//好友添加成功事件
|
||||||
if (element.grayTipElement.xmlElement.templId === '10229' && msg.peerUin !== '') {
|
if (element.grayTipElement.xmlElement.templId === '10229' && msg.peerUin !== '') {
|
||||||
return new OB11FriendAddNoticeEvent(core, parseInt(msg.peerUin));
|
return new OB11FriendAddNoticeEvent(core, parseInt(msg.peerUin));
|
||||||
@@ -556,7 +556,7 @@ export class OB11Constructor {
|
|||||||
logger.logError('解析表情回应消息失败', e.stack);
|
logger.logError('解析表情回应消息失败', e.stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (grayTipElement.subElementType == GrayTipElementSubType.INVITE_NEW_MEMBER) {
|
if (grayTipElement.subElementType == NTGrayTipElementSubTypeV2.GRAYTIP_ELEMENT_SUBTYPE_XMLMSG) {
|
||||||
logger.logDebug('收到新人被邀请进群消息', grayTipElement);
|
logger.logDebug('收到新人被邀请进群消息', grayTipElement);
|
||||||
const xmlElement = grayTipElement.xmlElement;
|
const xmlElement = grayTipElement.xmlElement;
|
||||||
if (xmlElement?.content) {
|
if (xmlElement?.content) {
|
||||||
@@ -582,7 +582,7 @@ export class OB11Constructor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//代码歧义 GrayTipElementSubType.MEMBER_NEW_TITLE
|
//代码歧义 GrayTipElementSubType.MEMBER_NEW_TITLE
|
||||||
else if (grayTipElement.subElementType == GrayTipElementSubType.MEMBER_NEW_TITLE) {
|
else if (grayTipElement.subElementType == NTGrayTipElementSubTypeV2.GRAYTIP_ELEMENT_SUBTYPE_JSON) {
|
||||||
const json = JSON.parse(grayTipElement.jsonGrayTipElement.jsonStr);
|
const json = JSON.parse(grayTipElement.jsonGrayTipElement.jsonStr);
|
||||||
if (grayTipElement.jsonGrayTipElement.busiId == 1061) {
|
if (grayTipElement.jsonGrayTipElement.busiId == 1061) {
|
||||||
//判断业务类型
|
//判断业务类型
|
||||||
|
Reference in New Issue
Block a user