MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / typesenseOnUserNameUpdate

Function typesenseOnUserNameUpdate

packages/queue/src/tasks/typesense.ts:209–234  ·  view source on GitHub ↗
(
  payload: any,
  helpers: JobHelpers
)

Source from the content-addressed store, hash-verified

207};
208
209export const typesenseOnUserNameUpdate = async (
210 payload: any,
211 helpers: JobHelpers
212) => {
213 const logger = new Logger(helpers.logger);
214
215 const { accountId, userId } = z
216 .object({
217 accountId: z.string().uuid(),
218 userId: z.string().uuid(),
219 })
220 .parse(payload);
221
222 const keepAlive = new KeepAlive(helpers);
223 keepAlive.start();
224
225 try {
226 await handleUserNameUpdate({ accountId, logger, userId });
227 } catch (error: any) {
228 if (error.message !== 'account missing searchSettings') {
229 throw error;
230 }
231 } finally {
232 keepAlive.end();
233 }
234};
235
236export const typesenseOnMessageCreation = async (
237 payload: any,

Callers

nothing calls this directly

Calls 3

startMethod · 0.95
endMethod · 0.95
handleUserNameUpdateFunction · 0.90

Tested by

no test coverage detected