Description
The current Apps Engine IPostUserDeleted interface requires executePostUserCreated, while the listener manager dispatches executePostUserDeleted when a user is deleted. An app that implements the deletion hook described by the interface therefore fails to compile, and a creation-only handler satisfies the deletion interface.
Steps to reproduce
On develop 0de406c6e35883da705dc28881abc4115b3adbd3, compile this against @rocket.chat/apps-engine:
class DeletedUserHandler implements IPostUserDeleted {
public async executePostUserDeleted(): Promise<void> {}
}
TypeScript reports that executePostUserCreated is missing. A creation-only object is accepted as IPostUserDeleted instead. The enum already has EXECUTE_POST_USER_DELETED, and AppListenerManager.executePostUserDeleted() calls that method.
Expected behavior
The deletion interface requires the deletion hook; the creation interface remains unchanged. No dispatch/protocol changes are needed.
Verification and context
The package's full type-test compiler reports the failing deletion implementation and an unused @ts-expect-error for a creation-only negative fixture. No dependency-resolution errors remain in this reproduction. This was reported in the retired Apps Engine repository as RocketChat/Rocket.Chat.Apps-engine#656; a maintainer directed contributions to the Rocket.Chat monorepo. Searched current issues/PRs for overlapping fixes and claims. I am preparing the interface correction with positive deletion/creation fixtures and a negative creation-only fixture. AI tools assisted investigation and tests.
Description
The current Apps Engine
IPostUserDeletedinterface requiresexecutePostUserCreated, while the listener manager dispatchesexecutePostUserDeletedwhen a user is deleted. An app that implements the deletion hook described by the interface therefore fails to compile, and a creation-only handler satisfies the deletion interface.Steps to reproduce
On develop
0de406c6e35883da705dc28881abc4115b3adbd3, compile this against@rocket.chat/apps-engine:TypeScript reports that
executePostUserCreatedis missing. A creation-only object is accepted asIPostUserDeletedinstead. The enum already hasEXECUTE_POST_USER_DELETED, andAppListenerManager.executePostUserDeleted()calls that method.Expected behavior
The deletion interface requires the deletion hook; the creation interface remains unchanged. No dispatch/protocol changes are needed.
Verification and context
The package's full type-test compiler reports the failing deletion implementation and an unused
@ts-expect-errorfor a creation-only negative fixture. No dependency-resolution errors remain in this reproduction. This was reported in the retired Apps Engine repository as RocketChat/Rocket.Chat.Apps-engine#656; a maintainer directed contributions to the Rocket.Chat monorepo. Searched current issues/PRs for overlapping fixes and claims. I am preparing the interface correction with positive deletion/creation fixtures and a negative creation-only fixture. AI tools assisted investigation and tests.