Page MenuHomePhabricator

[keyserver] accept webhook cast created events tagging comm
ClosedPublic

Authored by will on Oct 20 2024, 9:52 PM.
Tags
None
Referenced Files
F3366436: D13754.id45549.diff
Mon, Nov 25, 11:23 AM
F3363745: D13754.id45490.diff
Mon, Nov 25, 3:18 AM
Unknown Object (File)
Sat, Nov 23, 7:56 AM
Unknown Object (File)
Fri, Nov 22, 5:30 PM
Unknown Object (File)
Wed, Nov 20, 8:29 AM
Unknown Object (File)
Wed, Nov 20, 8:29 AM
Unknown Object (File)
Tue, Nov 19, 11:08 PM
Unknown Object (File)
Tue, Nov 19, 8:12 PM
Subscribers

Details

Summary

Implement initial taggedCommFarcasterResponder with dummy logic

Depends on D13701

Test Plan

Triggered webhook event on warpcast and successfully received created cast event which passed validation

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

keyserver/src/responders/farcaster-webhook-responders.js
17 ↗(On Diff #45284)

This is a dummy statement. This will be removed in a future diff and replaced with relevant logic

lib/types/farcaster-types.js
65 ↗(On Diff #45284)

Originally tried to using NeynarChannel for this but backtracked as it meant loosening constraints. The webhook event neynar channel object does not include description, follower_count, and lead

will requested review of this revision.Oct 20 2024, 10:09 PM
ashoat requested changes to this revision.Oct 21 2024, 8:54 AM
ashoat added inline comments.
keyserver/src/responders/handlers.js
129 ↗(On Diff #45284)

What's the point of this line? Seems like we could just spread responderResult directly on line 130

lib/types/farcaster-types.js
45–75 ↗(On Diff #45284)

3/4 of these types fully enumerate all of their properties. But in the validator code below, you use t.interface for all of them.

Either the types are incorrect (you need to add ... to some of them), or some of the validators should use tShape.

52 ↗(On Diff #45284)

Can we be more specific than Object?

60 ↗(On Diff #45284)

Can we be more specific than Object?

This revision now requires changes to proceed.Oct 21 2024, 8:54 AM
keyserver/src/responders/handlers.js
129 ↗(On Diff #45284)

Yes. This was unnecessary. Going to directly spread responderResult in next rebase.

lib/types/farcaster-types.js
45–75 ↗(On Diff #45284)

It's the former. We likely shouldn't rely on Neynar/Farcaster to not add additional fields, so I plan to add ... to the next rebase

52 ↗(On Diff #45284)

I'm actually thinking I'll remove this for now

60 ↗(On Diff #45284)

We're not using embeds for my current work. Removing

review feedback and fixing types

will marked 3 inline comments as done.Oct 22 2024, 9:48 PM
ashoat added inline comments.
keyserver/src/responders/handlers.js
129

You still have this unnecessary line

This revision is now accepted and ready to land.Oct 23 2024, 6:30 AM
will marked an inline comment as done.

remove unnecessary line