Skip to content

Commit

Permalink
Tweak active view refresher
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Nov 8, 2023
1 parent 1f1b798 commit adec163
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions functions/refresh_main_views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,9 @@ export default SlackFunction(def, async ({ token, env, client }) => {
const foundUsers: string[] = [];
for (const activeView of activeViews) {
try {
if (foundUsers.includes(activeView.user_id)) {
await av.deleteById({ id: activeView.view_id });
continue;
if (!foundUsers.includes(activeView.user_id)) {
foundUsers.push(activeView.user_id);
}
foundUsers.push(activeView.user_id);

if (activeView.last_updated_callback_id === CallbackId.MainView) {
if (activeView.last_updated_at < now - minutes) {
Expand Down

0 comments on commit adec163

Please sign in to comment.