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)
Fri, Nov 29, 6:12 AM
Unknown Object (File)
Fri, Nov 29, 3:04 AM
Unknown Object (File)
Fri, Nov 29, 12:14 AM
Unknown Object (File)
Thu, Nov 28, 9:04 PM
Unknown Object (File)
Thu, Nov 28, 8:03 PM
Unknown Object (File)
Thu, Nov 28, 3:11 PM
Unknown Object (File)
Thu, Nov 28, 1:05 PM
Unknown Object (File)
Wed, Nov 27, 2:52 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.Oct 29 2024, 11:43 PM
ashoat added inline comments.
keyserver/src/updaters/thread-updaters.js
61

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

Included in latest rebase

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