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

Automatically invoke the InstallationStore's deleteInstallation function for relevant events #1203

Open
4 of 10 tasks
misscoded opened this issue Nov 8, 2021 · 11 comments
Open
4 of 10 tasks
Assignees
Labels
auto-triage-skip Prevent this issue from being closed due to lack of activity enhancement M-T: A feature request for new functionality good first issue Good for newcomers semver:minor
Milestone

Comments

@misscoded
Copy link
Contributor

Description

Currently, deleteInstallation of a developer-provided InstallationStore must be invoked manually. It would be more intuitive behavior to have it invoked automatically when the app_uninstalled and token_revoked events are received.

Aside from a couple of community members raising questions around this (#1201, #1112), it's my understanding that the Java and Python implementations already support this.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.
@misscoded misscoded added the enhancement M-T: A feature request for new functionality label Nov 8, 2021
@seratch
Copy link
Member

seratch commented Nov 8, 2021

@github-actions
Copy link

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

@misscoded misscoded added this to the 3.x milestone Jan 7, 2022
@TroutZen
Copy link

Excited for this change for the js sdk!

@seratch seratch modified the milestones: 3.x, 3.11.0 Feb 24, 2022
@seratch seratch modified the milestones: 3.11.0, 3.12.0 Mar 26, 2022
@ElMatella
Copy link

ElMatella commented Jun 15, 2022

Hey, thank you for this issue. I have a question until this gets implemented, how am I suppose to call deleteInstallation manually?

Currently, I use the app_uninstalled event like this:

app.event('app_uninstalled', async ({ event, logger, context }) => {
  try {
    await database.doc(context.enterpriseId || context.teamId).delete()
  }
  catch (error) {
    logger.error(error);
  }
});

I don't use my installationStore.deleteInstallation at all.. And I'm not sur that the code I made supports enterprise correctly. Could you give me a hand on that one?

Thank you very much

@seratch
Copy link
Member

seratch commented Jun 15, 2022

@ElMatella I would suggest implementing the deleteInstallation method for easier migration when the built-in handlers are released. You can check the type definitions related to the method signature below:

@ElMatella
Copy link

Hey, thank you for your response.

So, I was just wondering, how can I access the isEnterpriseInstall from the app_uninstalled event?

In bolt, I should be able to access the context.enterpriseId and context.teamId from the app_uninstalled event handler. Does the fact that context.enterpriseId is not null means that isEnterpriseInstall is true?

@seratch
Copy link
Member

seratch commented Jun 16, 2022

If your app is removed from the entire enterprise grid organization, the event payload should have only enterprise_id. If the app is removed only from a specific workspace under an enterprise grid org, the payload should have both enterprise_id and team_id.

@seratch seratch modified the milestones: 3.12.0, 3.x Jul 4, 2022
@hiroshinishio
Copy link

Is this still active or will be active in the future?

@clementlemon02
Copy link

Hey, can I check if this is already implemented on bolt-js?

@filmaj filmaj removed this from the 3.x milestone Mar 21, 2024
Copy link

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

Copy link

github-actions bot commented May 6, 2024

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2024
@filmaj filmaj reopened this May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-triage-skip Prevent this issue from being closed due to lack of activity enhancement M-T: A feature request for new functionality good first issue Good for newcomers semver:minor
Projects
None yet
Development

No branches or pull requests

8 participants