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

Remove all messages from cache when removing a connected account #5907

Closed
bosiraphael opened this issue Jun 17, 2024 · 2 comments
Closed

Remove all messages from cache when removing a connected account #5907

bosiraphael opened this issue Jun 17, 2024 · 2 comments
Assignees

Comments

@bosiraphael
Copy link
Contributor

bosiraphael commented Jun 17, 2024

Scope & Context

We should remove all messages to import linked to a connected account it's deleted.

Technical inputs

  • Add a listener on message channel deletion
await this.cacheStorage.setPop(
      `messages-to-import:${workspaceId}:gmail:${messageChannelId}`,
    );
Copy link
Contributor

greptile-apps bot commented Jun 17, 2024

To remove all messages from cache when a connected account is deleted, follow these steps:

  1. Open src/listeners/messaging-connected-account.listener.ts.
  2. Add a listener for the message channel deletion event.
  3. Use the cacheStorage.setPop method to remove messages from the cache:
await this.cacheStorage.setPop(
  `messages-to-import:${workspaceId}:gmail:${messageChannelId}`,
);

References

@bosiraphael bosiraphael self-assigned this Jun 17, 2024
@bosiraphael
Copy link
Contributor Author

Closed by #6021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant