MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / pushCommunity

Function pushCommunity

apps/web/services/push/index.ts:135–164  ·  view source on GitHub ↗
({
  communityId,
  channelId,
  threadId,
  messageId,
  imitationId,
  isThread,
  isReply,
  message,
  thread,
}: {
  communityId: string;
} & PushType)

Source from the content-addressed store, hash-verified

133};
134
135export const pushCommunity = ({
136 communityId,
137 channelId,
138 threadId,
139 messageId,
140 imitationId,
141 isThread,
142 isReply,
143 message,
144 thread,
145}: {
146 communityId: string;
147} & PushType) => {
148 if (!communityId) return Promise.resolve();
149 return request
150 .post(`${getPushUrlSSR()}/api/community`)
151 .send({
152 community_id: communityId,
153 channel_id: channelId,
154 thread_id: threadId,
155 message_id: messageId,
156 imitation_id: imitationId,
157 is_thread: isThread,
158 is_reply: isReply,
159 message,
160 thread,
161 token,
162 })
163 .then((e) => e.status);
164};
165
166export function resolvePush({
167 channel,

Callers 1

resolvePushFunction · 0.85

Calls 3

getPushUrlSSRFunction · 0.90
sendMethod · 0.45
postMethod · 0.45

Tested by

no test coverage detected