MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / getUpdates

Function getUpdates

packages/weixin/src/api.ts:69–95  ·  view source on GitHub ↗
(
  baseUrl: string,
  token: string,
  getUpdatesBuf: string,
  signal?: AbortSignal,
)

Source from the content-addressed store, hash-verified

67}
68
69export async function getUpdates(
70 baseUrl: string,
71 token: string,
72 getUpdatesBuf: string,
73 signal?: AbortSignal,
74): Promise<GetUpdatesResp> {
75 const body: GetUpdatesReq = {
76 get_updates_buf: getUpdatesBuf,
77 base_info: baseInfo(),
78 }
79
80 try {
81 return await post<GetUpdatesResp>(
82 baseUrl,
83 '/ilink/bot/getupdates',
84 body,
85 token,
86 40_000,
87 signal,
88 )
89 } catch (error) {
90 if (error instanceof Error && error.name === 'AbortError') {
91 return { ret: 0, msgs: [], get_updates_buf: getUpdatesBuf }
92 }
93 throw error
94 }
95}
96
97export async function sendMessage(
98 baseUrl: string,

Callers 1

startPollLoopFunction · 0.85

Calls 1

baseInfoFunction · 0.85

Tested by

no test coverage detected