( payload: any, helpers: JobHelpers )
| 207 | }; |
| 208 | |
| 209 | export 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 | |
| 236 | export const typesenseOnMessageCreation = async ( |
| 237 | payload: any, |
nothing calls this directly
no test coverage detected