Page MenuHomePhabricator

[web] Refresh invite links
ClosedPublic

Authored by tomek on Jun 19 2023, 8:42 AM.
Tags
None
Referenced Files
F3367418: D8246.id28109.diff
Mon, Nov 25, 2:48 PM
F3367417: D8246.id28005.diff
Mon, Nov 25, 2:48 PM
F3367416: D8246.id27858.diff
Mon, Nov 25, 2:48 PM
Unknown Object (File)
Sat, Nov 23, 3:53 AM
Unknown Object (File)
Sat, Nov 23, 3:53 AM
Unknown Object (File)
Sun, Nov 10, 12:32 PM
Unknown Object (File)
Sat, Nov 9, 4:19 AM
Unknown Object (File)
Fri, Nov 8, 10:40 AM
Subscribers

Details

Summary

Every time a window becomes active, fetch invite links so that we can display the most recent version without requesting too often. Ultimately, we would like to have a mechanism where every invite link change results in updates being sent to interested clients.

Depends on D8239

Test Plan

Check if actions are dispatched when the window becomes active.
Modify website responder so that an empty invite links store is returned. Check if the links are updated after successful result is returned from the server when a window becomes active.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.Jun 19 2023, 8:59 AM
kamil added inline comments.
web/invite-links/invite-links-refresher.react.js
22 ↗(On Diff #27858)

shouldn't we also check whether we have logged in user to avoid not necessary endpoint calls?

This revision is now accepted and ready to land.Jun 22 2023, 3:29 AM
web/invite-links/invite-links-refresher.react.js
22 ↗(On Diff #27858)

Ok, makes sense!

Fetch links only when user is logged in and clear the store after logout

This revision was automatically updated to reflect the committed changes.