Page MenuHomePhabricator

[web] Refresh invite links
ClosedPublic

Authored by tomek on Jun 19 2023, 8:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 2:41 PM
Unknown Object (File)
Sat, May 4, 2:41 PM
Unknown Object (File)
Sat, May 4, 2:41 PM
Unknown Object (File)
Sat, May 4, 2:41 PM
Unknown Object (File)
Sat, May 4, 2:41 PM
Unknown Object (File)
Sat, May 4, 5:15 AM
Unknown Object (File)
Sat, May 4, 5:14 AM
Unknown Object (File)
Sat, May 4, 5:14 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.