unsplash / mercury

The guide of souls to the underworld.
https://unsplash.github.io/mercury/
MIT License
3 stars 0 forks source link

Stale channel cache #5

Open samhh opened 1 year ago

samhh commented 1 year ago

The channel map is cached in memory after the first successful request, and there's currently no way to reset it without restarting the app. This could be an issue if channels are renamed.

https://github.com/unsplash/mercury/blob/4b0b337d92fe435428e2c7bcd1504c4ede6acd28/src/slack/channel.rs#L132

samhh commented 1 year ago

It'll also be an issue with new channels. And secondary workspaces.

samhh commented 1 year ago

Channel IDs can be unstable too ^1:

🚧 Channel IDs can become unstable in certain situations

There are a few circumstances channel IDs might change within a workspace. If you can operate without depending on their stability, you'll be well-prepared for unfortunate hijinks.

In the future, we'll mitigate this unexpected transition with appropriate Events API events or other solutions.

In the meantime, be aware this might happen and use conversations.list regularly to monitor change for known #channel names if ID stability is important to you.

samhh commented 1 year ago

This will help but doesn't resolve the issue: https://github.com/unsplash/mercury/commit/a45d1e585bb6e7bcd59b516797a180c58c8ca601