diff --git a/keyserver/src/frog/frog.js b/keyserver/src/frog/frog.js --- a/keyserver/src/frog/frog.js +++ b/keyserver/src/frog/frog.js @@ -1,5 +1,4 @@ // @flow - /** @jsxImportSource hono/jsx */ /* eslint-disable react/react-in-jsx-scope */ @@ -16,8 +15,8 @@ function startFrogHonoServer() { const frogApp = new Frog({ title: 'Comm' }); - frogApp.frame('/:inviteLink/:channelID', async c => { - const { inviteLink, channelID } = c.req.param(); + frogApp.frame('/:inviteLink/:channelID/:taggerUsername', async c => { + const { inviteLink, channelID, taggerUsername } = c.req.param(); let buttonLink = 'https://comm.app'; const inviteLinkURLPrefix = inviteLinkURL(''); @@ -43,6 +42,24 @@ header_image_url = channelInfo.header_image_url; } + const displayUsername = + taggerUsername.length > 16 + ? `${taggerUsername.slice(0, 16)}[...]` + : taggerUsername; + + const channelIcon = channelInfo?.image_url ? ( + icon + ) : null; + return c.res({ image: (
+
+
+ {channelIcon} + + Thread Invitation + +
+ +
+ + @{displayUsername} created a thread on Comm + +
+
), intents: [