HomePhabricator
Diffusion Comm 818349ebd001

[keyserver] add community creation logic to farcaster webhook responder

Description

[keyserver] add community creation logic to farcaster webhook responder

Summary:
This adds the logic for communtity creation to the farcaster webhook responder. We either decide to early return or continue to sidebar creation with the resulting channelCommunityID.

In the case that AUTHORITATIVE_FARCASTER_BOT is set, we create new communities if they haven't already been created and tagged through the blob service or default to the no channel community if no channel was specified.

Depends on D13834

Test Plan:
I used rahul's testingthings channel for testing this. I created a webhook event by tagging myself with #createathread. I then copied this webhook event and used it to trigger the responder.

On staging, I created a dummy user with rahul's fid as well as a dummy user with my fid. In triggering the responder with authoritativeFarcasterBot set to true, confirmed that the community was created with rahul set to admin.

Reset everything to prior and ensured that if rahul's fid didn't exist on staging identity, retriggering the responder resulted in the same community but with the tagger (my fid) as the admin.

Verified community creation through iOS simulator. Properly set as tagged to farcaster testingthings channel

Retriggered responder to verify that it then picked up on the community already existing and returning the proper community threadID.

Depends on D13774

Reviewers: ashoat, varun

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D13775