mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bdec16266e | ||
![]() |
49ca698ab9 | ||
![]() |
3efd8163c9 | ||
![]() |
cc2d11449c |
@@ -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": [
|
||||||
{
|
{
|
||||||
|
@@ -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",
|
||||||
|
@@ -1 +1 @@
|
|||||||
export const napCatVersion = '3.5.1';
|
export const napCatVersion = '3.6.0';
|
||||||
|
Binary file not shown.
@@ -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 {
|
||||||
|
@@ -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([
|
||||||
|
Reference in New Issue
Block a user