Compare commits

..

4 Commits

Author SHA1 Message Date
手瓜一十雪
bdec16266e fix: #498 2024-11-06 14:42:05 +08:00
Mlikiowa
49ca698ab9 release: v3.6.0 2024-11-06 03:30:17 +00:00
pk5ls20
3efd8163c9 fix: MoeHoo-Linux Amd64 2024-11-06 11:28:57 +08:00
pk5ls20
cc2d11449c release: v3.5.2 2024-11-06 09:28:14 +08:00
6 changed files with 12 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
"name": "NapCatQQ", "name": "NapCatQQ",
"slug": "NapCat.Framework", "slug": "NapCat.Framework",
"description": "高性能的 OneBot 11 协议实现", "description": "高性能的 OneBot 11 协议实现",
"version": "3.5.1", "version": "3.6.0",
"icon": "./logo.png", "icon": "./logo.png",
"authors": [ "authors": [
{ {

View File

@@ -2,7 +2,7 @@
"name": "napcat", "name": "napcat",
"private": true, "private": true,
"type": "module", "type": "module",
"version": "3.5.1", "version": "3.6.0",
"scripts": { "scripts": {
"build:framework": "vite build --mode framework", "build:framework": "vite build --mode framework",
"build:shell": "vite build --mode shell", "build:shell": "vite build --mode shell",

View File

@@ -1 +1 @@
export const napCatVersion = '3.5.1'; export const napCatVersion = '3.6.0';

View File

@@ -6,10 +6,15 @@ const SchemaData = {
type: 'object', type: 'object',
properties: { properties: {
friend_id: { type: ['string', 'number'] }, friend_id: { type: ['string', 'number'] },
user_id: { type: ['string', 'number'] },
temp_block: { type: 'boolean' }, temp_block: { type: 'boolean' },
temp_both_del: { type: 'boolean' }, temp_both_del: { type: 'boolean' },
}, },
required: ['friend_id'], oneOf: [
{ required: ['friend_id'] },
{ required: ['user_id'] },
],
} as const satisfies JSONSchema; } as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>; type Payload = FromSchema<typeof SchemaData>;
@@ -18,7 +23,8 @@ export class GoCQHTTPDeleteFriend extends BaseAction<Payload, any> {
payloadSchema = SchemaData; payloadSchema = SchemaData;
async _handle(payload: Payload) { async _handle(payload: Payload) {
const uid = await this.core.apis.UserApi.getUidByUinV2(payload.friend_id.toString()); const uin = payload.friend_id ?? payload.user_id ?? '';
const uid = await this.core.apis.UserApi.getUidByUinV2(uin.toString());
if (!uid) { if (!uid) {
return { return {

View File

@@ -164,7 +164,7 @@ async function onSettingWindowCreated(view) {
SettingItem( SettingItem(
'<span id="napcat-update-title">Napcat</span>', '<span id="napcat-update-title">Napcat</span>',
void 0, void 0,
SettingButton("V3.5.1", "napcat-update-button", "secondary") SettingButton("V3.6.0", "napcat-update-button", "secondary")
) )
]), ]),
SettingList([ SettingList([