Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: 添加沙盒用户时触发的 guild-member-added 事件无视过滤器 #1470

Open
DGCK81LNN opened this issue Oct 21, 2024 · 0 comments
Labels
bug BUG

Comments

@DGCK81LNN
Copy link
Contributor

DGCK81LNN commented Oct 21, 2024

Describe the bug

^

Steps to reproduce

  1. 创建并启用以下插件,设置过滤器:平台 等于 onebot 群组 ID 等于 123456789

    export const name = "greet"
    
    export function apply(ctx) {
      ctx.on("guild-member-added", session => {
        ctx.logger.info("aaa", session)
      })
    }
  2. 在 Koishi 控制台的“沙盒”中添加用户

  3. 2024-10-21 11:46:27 [I] greet aaa Session { id: 728, event: { user: { id: 'Dave', name: 'Dave' }, channel: { id: '#', type: 0 }, guild: { id: '#' }, timestamp: 1729482387839, selfId: 'koishi', platform: 'sandbox:pmnmowshgei', type: 'guild-member-added' }, locales: [], [Symbol(cordis.tracker)]: { associate: 'session', property: 'ctx' } }

其他平台成员加入群组的事件则可以正常被过滤。

Expected behavior

在沙盒添加用户不应该触发带上述过滤器的插件中的钩子。

Screenshots

No response

Versions

  • OS: Windows Server 2012
  • Platform: N/A
  • Node version: 22.9.0
  • Koishi version: 4.18.0

Additional context

No response

@DGCK81LNN DGCK81LNN added the bug BUG label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug BUG
Projects
None yet
Development

No branches or pull requests

1 participant