Page MenuHomePhabricator

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

Authored by will on Tue, Oct 29, 11:25 PM.

Details

Reviewers
ashoat
varun
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

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

Included in latest rebase

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