Page MenuHomePhabricator

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

Authored by will on Tue, Oct 29, 11:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 9:53 AM
Unknown Object (File)
Thu, Nov 21, 4:34 AM
Unknown Object (File)
Fri, Nov 15, 4:58 AM
Unknown Object (File)
Fri, Nov 15, 4:57 AM
Unknown Object (File)
Fri, Nov 15, 2:06 AM
Unknown Object (File)
Thu, Nov 14, 6:55 PM
Unknown Object (File)
Thu, Nov 14, 3:59 PM
Unknown Object (File)
Thu, Nov 14, 2:53 PM
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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

will requested review of this revision.Tue, Oct 29, 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.Wed, Oct 30, 4:38 AM
keyserver/src/updaters/thread-updaters.js
61 ↗(On Diff #45451)

Included in latest rebase

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