neynarxyz / nodejs-sdk

Typescript SDK for Neynar APIs
https://neynar.com
MIT License
54 stars 11 forks source link

`respondChannelInvite` success, but not becoming member #186

Closed zacharytyhacz closed 1 month ago

zacharytyhacz commented 1 month ago

Version

"@neynar/nodejs-sdk": "^1.58.0"

I am trying to accept a channel invite, but it is not working.

I get invites for our user's FID

  export const getIntoriChannelInvites = async (): Promise<ChannelInviteType[]> => {
    try {
      const res = await warpcastApi.get(
        '/fc/channel-invites',
        {
          params: {
            fid: process.env.INTORI_USER_FID
          }
        }
      )

      return res.data?.result?.invites ?? []
    } catch (err) {
      console.error('Warpcast API error:', err)
      return []
    }
  }

I am seeing a valid channel invite:

image

respond to the invite, returns success and no message

  export const acceptChannelInvite = async (params: {
    channelId: string
    role: 'moderator' | 'member'
  }) => {
    console.log('Accepting channel invite', params)
    return neynar.respondChannelInvite(
      process.env.NEYNAR_SIGNER_UUID ?? 'missing signer uuid',
      params.channelId,
      params.role,
      true
    )
  }

Response: image

Invite goes away, but this user never becomes a member. Even after waiting 1+ hour

manan19 commented 1 month ago

@zacharytyhacz Is the invited member following the channel they are being invited to?

zacharytyhacz commented 1 month ago

@zacharytyhacz Is the invited member following the channel they are being invited to?

Yes, the user is following the channel.

manan19 commented 1 month ago

@zacharytyhacz thanks for the detailed ticket. As discussed on the call, the same process worked well when trying it again today. Seems like it could've been a transient bug, we'll reopen this ticket if it happens again.