Skip to content

Commit

Permalink
fix: 好友事件启用
Browse files Browse the repository at this point in the history
  • Loading branch information
sj817 committed Jan 17, 2025
1 parent 8f2a209 commit 7109f61
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
"name": "@karinjs/project",
"version": "1.0.0",
"description": "",
"main": "",
"keywords": [],
"license": "MIT",
"author": "shijin",
"type": "module",
"main": "",
"scripts": {
"dev": "cd packages/core && pnpm run dev",
"dev:web": "cd packages/web && pnpm run dev",
"build": "cd packages/core && pnpm run build",
"build": "pnpm --filter node-karin run build",
"build:all": "pnpm run build && pnpm run build:web",
"build:prod": "pnpm --filter node-karin run build:prod",
"build:web": "cd packages/web && pnpm run build",
"build:all": "pnpm run build && pnpm run build:web"
"dev": "pnpm --filter node-karin run dev",
"dev:cli": "pnpm --filter node-karin run dev:cli",
"dev:web": "cd packages/web && pnpm run dev"
},
"devDependencies": {
"@types/node": "^22.5.0",
Expand All @@ -25,8 +30,5 @@
},
"peerDependencies": {
"node-karin": "workspace:*"
},
"keywords": [],
"author": "shijin",
"license": "MIT"
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"pr": "node cli/pr.js all",
"pub": "npm publish --access public",
"pub-beta": "npm publish --access public --tag beta",
"sort": "npx sort-package-json && sort-json tsconfig.json"
"sort": "sort-package-json && sort-json tsconfig.json"
},
"dependencies": {
"@types/express": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/event/handler/other/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export const privateFilterEvent = (
cd: boolean,
): boolean => {
if (ctx.isFriend) {
if (!config?.user?.enable) {
if (!config?.friend?.enable) {
log(ctx.userId, `当前好友事件未启用: ${ctx.eventId}`)
return false
}
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/types/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export interface Config {
admin: string[]
/** 用户管理 */
user: {
/** 是否启用用户事件 */
enable: boolean
/** 用户白名单 */
enable_list: string[]
/** 用户黑名单 */
Expand Down

0 comments on commit 7109f61

Please sign in to comment.