Page MenuHomePhabricator

[keyserver] check if viewer role is positive for updateThread
ClosedPublic

Authored by will on Oct 29 2024, 11:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 9:14 PM
Unknown Object (File)
Mon, Dec 16, 9:14 PM
Unknown Object (File)
Mon, Dec 16, 9:14 PM
Unknown Object (File)
Mon, Dec 16, 9:14 PM
Unknown Object (File)
Mon, Dec 16, 9:13 PM
Unknown Object (File)
Thu, Dec 5, 3:12 AM
Unknown Object (File)
Wed, Dec 4, 11:40 PM
Unknown Object (File)
Fri, Nov 29, 6:12 AM
Subscribers

Details

Summary

Was running into an issue where because the viewer was constructed as a script viewer, it couldn't be added to the community thread with joinThread as fetchViewerIsMember always returns that script viewers are members. This diff
instead replaces the is a member check with a check for if the viewer role is positive, which will allow us to add script viewers to the thread.

Discussion at https://linear.app/comm/issue/ENG-8457/create-comm-community-for-a-farcaster-channel-if-it-doesnt-already

Depends on D13775

Test Plan

Was able to successfully add commbot and a test comm user to the community thread. Subsequent attempts to add did not result in duplicate robotext

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

will requested review of this revision.Oct 29 2024, 11:43 PM
ashoat added inline comments.
keyserver/src/updaters/thread-updaters.js
61 ↗(On Diff #45451)

We don't need this as rename anymore. It previously there because something named viewerIsMember is already imported (line 10)

This revision is now accepted and ready to land.Oct 30 2024, 4:38 AM
keyserver/src/updaters/thread-updaters.js
61 ↗(On Diff #45451)

Included in latest rebase

will marked an inline comment as done.Oct 30 2024, 1:46 PM