Skip to content

Apps Engine IPostUserDeleted requires the user-creation hook instead of deletion #42579

Description

@YashAnand69

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.

Activity

  1. goransh-walia commented on Oct 6, 2026

    @goransh-walia

    This would be a genuinely useful fix/addition for the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions