chore: reformat code style

This commit is contained in:
Seijo Cecilia
2024-08-26 14:52:05 +08:00
parent 3ec0edfc60
commit 7671174a96
60 changed files with 295 additions and 237 deletions

View File

@@ -32,7 +32,7 @@ class DeleteMsg extends BaseAction<Payload, void> {
'NodeIKernelMsgListener/onMsgInfoListUpdate',
1,
5000,
(msgs) => !!msgs.find(m => m.msgId === msg.MsgId && m.recallTime !== '0')
(msgs) => !!msgs.find(m => m.msgId === msg.MsgId && m.recallTime !== '0'),
).catch(() => new Promise<undefined>((resolve) => {
resolve(undefined);
}));

View File

@@ -26,7 +26,7 @@ class MarkMsgAsRead extends BaseAction<PlayloadType, null> {
return { chatType: isBuddy ? ChatType.KCHATTYPEC2C : ChatType.KCHATTYPETEMPC2CFROMGROUP, peerUid };
}
if (!payload.group_id) {
throw new Error( '缺少参数 group_id 或 user_id');
throw new Error('缺少参数 group_id 或 user_id');
}
return { chatType: ChatType.KCHATTYPEGROUP, peerUid: payload.group_id.toString() };
}

View File

@@ -113,7 +113,7 @@ export class SendMsg extends BaseAction<OB11PostSendMsg, ReturnDataType> {
const messages = normalize(
payload.message,
typeof payload.auto_escape === 'string' ? payload.auto_escape === 'true' : !!payload.auto_escape
typeof payload.auto_escape === 'string' ? payload.auto_escape === 'true' : !!payload.auto_escape,
);
if (getSpecialMsgNum(payload, OB11MessageDataType.node)) {