Menu

Chat SDK adds Linq support - Vercel
📰

Chat SDK adds Linq support - Vercel

Vercel News·Ben Sabic·5 days ago
#23sCjfCH
#vercel#chat#adapter#thread#linq
Reading 0:00
15s threshold

Chat SDK now supports Linq with the new vendor-official adapter .

Build bots that send and receive texts in both direct messages and group chats, with bidirectional media and native iMessage tapback reaction support. Replies use the standard Chat SDK thread and message APIs, with HMAC-verified webhooks and stable threading.

import { Chat } from "chat" ;

import { createMemoryState } from "@chat-adapter/state-memory" ;

import { createLinqAdapter } from "@linqapp/chat-sdk-adapter" ;

export const bot = new Chat ( {

userName : "Linq Bot" ,

adapters : {

linq : createLinqAdapter ( {

apiKey : process . env . LINQ_API_KEY ,

signingSecret : process . env . LINQ_WEBHOOK_SECRET ,

} ) ,

} ,

state : createMemoryState ( ) ,

} ) ;

bot . onDirectMessage ( async ( thread , message ) => {

await thread . subscribe ( ) ;

await thread . post ( ` You said: ${ message . text } ` ) ;

} ) ;

bot . onReaction ( [ "thumbs_up" ] , async ( event ) => {

await event . thread .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.