Skip to content

Commit

Permalink
refactor(core): remove unnecessary template clone check
Browse files Browse the repository at this point in the history
- Remove the visibility check for 'template_clone' in the apply function
- This change simplifies the middleware logic by removing an unnecessary condition
  • Loading branch information
dingyi222666 committed Nov 22, 2024
1 parent 8d6fefa commit d847275
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/core/src/middlewares/set_auto_update_room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ export function apply(ctx: Context, config: Config, chain: ChatChain) {
return ChainMiddlewareRunStatus.STOP
}

if (targetRoom.visibility !== 'template_clone') {
context.message = session.text('.not_template_clone')
return ChainMiddlewareRunStatus.STOP
}

if (
targetRoom.roomMasterId !== session.userId &&
!(await checkAdmin(session))
Expand Down

0 comments on commit d847275

Please sign in to comment.