Page MenuHomePhabricator

[keyserver] replace farcaster bot reply text with frame
ClosedPublic

Authored by will on Fri, Dec 6, 8:34 PM.
Tags
None
Referenced Files
F3448359: D14093.diff
Wed, Dec 11, 10:29 PM
F3438064: image.png
Mon, Dec 9, 12:10 PM
F3438038: image.png
Mon, Dec 9, 12:04 PM
F3438029: Screenshot 2024-12-09 at 2.59.33 PM.png
Mon, Dec 9, 12:04 PM
F3423829: Screenshot 2024-12-06 at 9.16.45 PM.png
Fri, Dec 6, 8:35 PM
Subscribers

Details

Summary

This replaces the farcaster bot reply text with a frame

Depends on D14092

Test Plan

I tested by using ngrok with my local keyserver and triggering a webhook event on warpcast. This caused the farcaster bot to properly reply with the frame.
Made sure that the join channel button on the frame properly redirected to a comm app invite link

Before landing I plan on testing this on my self-hosted keyserver

Screenshot 2024-12-06 at 9.16.45 PM.png (1×1 px, 761 KB)

(It's replying as "wyilio" because I used my farcaster account to send the cast`)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

will edited the test plan for this revision. (Show Details)
will edited the test plan for this revision. (Show Details)
keyserver/src/responders/farcaster-webhook-responders.js
325 ↗(On Diff #46254)

hardcoded the channel id to use "comm" in case this was posted with no channel on farcaster. This will result in the default channel banner background

will requested review of this revision.Fri, Dec 6, 8:53 PM
ashoat added inline comments.
keyserver/src/responders/farcaster-webhook-responders.js
325 ↗(On Diff #46254)

In what scenarios will this comm fallback be used? Does it happen if a user is posting our frame without a channel?

This revision is now accepted and ready to land.Sun, Dec 8, 8:12 PM
keyserver/src/responders/farcaster-webhook-responders.js
325 ↗(On Diff #46254)

This will happen when a user casts in no channel with comm.eth #createathread, triggering our farcaster bot.

The frame url posted must include three parameters like so squadcal.org/frog/<invite link url>/<channel id>/<tagger username>.

Unfortunately, we can't just specify the channel id as empty in the url, so I'm using comm as a default so the frame will be generated as

Screenshot 2024-12-09 at 2.59.33 PM.png (1×2 px, 1 MB)

Now I'm realizing this could potentially be confusing as we include the comm avatar in the frame image, but the triggering cast wasn't necessarily posted in the comm channel. Instead, we could also opt to use a dummy channel id that we're sure isn't a farcaster channel id and never will be. We could also check for this specific dummy channel id in a prior diff to save us a neynar call

This is what it looks like when I specify the channel id in the frame url as "*":

image.png (1×2 px, 1022 KB)

keyserver/src/responders/farcaster-webhook-responders.js
325 ↗(On Diff #46254)

Talked about this offline and I think it's fine to proceed as-is. Separately:

image.png (1×2 px, 1022 KB)

This didn't get attached and isn't viable publicly (or to anybody other than @will)

keyserver/src/responders/farcaster-webhook-responders.js
325 ↗(On Diff #46254)

Synced with @ashoat in-person. Going to go with the first option of keeping it as comm. I think it's nice as it gives us a little more publicity with the Comm logo.

keyserver/src/responders/farcaster-webhook-responders.js
325 ↗(On Diff #46254)

Hm. Tried it again by downloading the image locally and copy and pasting the image with right click "Copy Image."

Maybe it works this way:

image.png (1×2 px, 1022 KB)

keyserver/src/responders/farcaster-webhook-responders.js
325 ↗(On Diff #46254)

Ashoat went through this really quickly in-person. For anyone curious:

  1. You can scroll up to the top of the diff and manually attach the file under "Referenced Files"
  2. You should drag and drop the image directly from your computer. The "Copy Image" drop down option doesn't seem to be sufficient