Page MenuHomePhabricator

set farcaster avatar and channel description in db during createOrUpdateFarcasterChannelTag
Needs RevisionPublic

Authored by varun on Wed, Oct 23, 10:47 AM.
Tags
None
Referenced Files
F3059587: D13778.id45357.diff
Thu, Oct 24, 4:19 AM
F3058031: D13778.id45359.diff
Wed, Oct 23, 10:51 PM
F3058030: D13778.id45357.diff
Wed, Oct 23, 10:51 PM
F3058028: D13778.id45351.diff
Wed, Oct 23, 10:51 PM
F3058018: D13778.id.diff
Wed, Oct 23, 10:51 PM
F3058011: D13778.diff
Wed, Oct 23, 10:51 PM
F3057852: D13778.id45359.diff
Wed, Oct 23, 10:09 PM
F3057761: D13778.id45359.diff
Wed, Oct 23, 10:04 PM
Subscribers

Details

Reviewers
ashoat
Summary

when a community is tagged with a farcaster channel, we want to display the farcaster channel avatar and description (without overwriting a pre-existing description or avatar)

Test Plan

Tested in conjunction with next diff

idnameavatardescription

Created community

84426Oct23NULLNULL

Tagged community with spam channel. NULL description was replaced with description from neynar. (also confirmed that avatar and description were updated on client)

84426Oct23{"type":"farcaster"}Dedicated channel for everything $SPAM

Removed tag. avatar was reset to NULL. description remained

84426Oct23NULLDedicated channel for everything $SPAM

Removed description from native app. It was set to an empty string

84426Oct23NULL

Added a new description from app.

84426Oct23NULLAsdf

Tagged community with a different channel. Avatar changed but description remained the same.

84426Oct23{"type":"farcaster"}Asdf

Removed tag

84426Oct23NULLAsdf

Removed description

84426Oct23NULL

Tagged community with a different channel. empty string description was replaced with description from neynar

84426Oct23{"type":"farcaster"}your musings, thoughts & dreams; welcome here

Removed tag and set a custom emoji avatar

84426Oct23{"type":"emoji","emoji":"?","color":"57697f"}your musings, thoughts & dreams; welcome here

Added and removed a new tag, avatar was not overwritten

84426Oct23{"type":"emoji","emoji":"?","color":"57697f"}your musings, thoughts & dreams; welcome here

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun published this revision for review.Wed, Oct 23, 11:01 AM

planning changes to rethink this a little

varun added inline comments.
keyserver/src/creators/farcaster-channel-tag-creator.js
114–125 ↗(On Diff #45351)

instead of doing this in the transaction, we should just do it in the background and use the updateThread function

use updateThread and modify the thread in the background. doing this lets us display robotext indicating what has changed

ashoat requested changes to this revision.Wed, Oct 23, 7:10 PM
ashoat added inline comments.
keyserver/src/creators/farcaster-channel-tag-creator.js
149–152

I would do this

160–161

Won't this crash if we fail to find request.commCommunityID? How about this

174

We can't do it in the background because the result of updateThread should be returned to the client and handled in reducers

This revision now requires changes to proceed.Wed, Oct 23, 7:10 PM
keyserver/src/creators/farcaster-channel-tag-creator.js
174

ah ok, yeah makes sense that we wouldn't rely on the state check