Page MenuHomePhabricator

reset avatar when deleteFarcasterChannelTag is called
ClosedPublic

Authored by varun on Oct 23 2024, 10:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 6:50 AM
Unknown Object (File)
Tue, Nov 26, 6:24 AM
Unknown Object (File)
Tue, Nov 26, 6:01 AM
Unknown Object (File)
Tue, Nov 26, 5:18 AM
Unknown Object (File)
Tue, Nov 26, 4:06 AM
Unknown Object (File)
Sun, Nov 24, 12:07 PM
Unknown Object (File)
Sun, Nov 24, 12:07 PM
Unknown Object (File)
Sun, Nov 24, 12:00 PM
Subscribers

Details

Summary

if a tagged community has a farcaster avatar, we should reset it to NULL when the tag is removed

Depends on D13778

Test Plan

Tested in conjunction with previous 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.Oct 23 2024, 11:00 AM

planning changes to rethink this a little

use updateThread in the background

ashoat requested changes to this revision.Oct 23 2024, 7:10 PM
ashoat added inline comments.
keyserver/src/deleters/farcaster-channel-tag-deleters.js
74 ↗(On Diff #45360)

Unsafe if we can't find the community

79 ↗(On Diff #45360)

Result should be returned to clients and reduced

This revision now requires changes to proceed.Oct 23 2024, 7:10 PM
ashoat added inline comments.
keyserver/src/deleters/farcaster-channel-tag-deleters.js
100 ↗(On Diff #45380)

Why do we need to do this spread?

lib/types/community-types.js
79–82 ↗(On Diff #45380)

Isn't this only used on the client? Given we currently update keyserver before client, seems like it'll always be set

lib/types/validators/farcaster-channel-tag-validators.js
33–34 ↗(On Diff #45380)

Isn't this only used on the client? Given we currently update keyserver before client, seems like it'll always be set

This revision is now accepted and ready to land.Oct 24 2024, 2:47 PM
lib/types/community-types.js
79–82 ↗(On Diff #45380)
lib/types/validators/farcaster-channel-tag-validators.js
33–34 ↗(On Diff #45380)