From 76e3cda88ee5f639a26389b87b45ce35681d1244 Mon Sep 17 00:00:00 2001 From: Merul Dhiman Date: Mon, 17 Nov 2025 16:11:53 +0530 Subject: [PATCH] fix: pictique requiring text on posts --- platforms/pictique-api/src/controllers/WebhookController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platforms/pictique-api/src/controllers/WebhookController.ts b/platforms/pictique-api/src/controllers/WebhookController.ts index 903cb401f..0c5097f78 100644 --- a/platforms/pictique-api/src/controllers/WebhookController.ts +++ b/platforms/pictique-api/src/controllers/WebhookController.ts @@ -174,6 +174,7 @@ export class WebhookController { } if (localId) { + local.data.text = local.data.text ?? ""; const post = await this.postsService.findById(localId); if (!post) return res.status(500).send(); for (const key of Object.keys(local.data)) { @@ -188,6 +189,7 @@ export class WebhookController { await this.postsService.postRepository.save(post); } else { console.log("Creating new post"); + local.data.text = local.data.text ?? ""; const post = await this.postsService.createPost( author?.id as string, // @ts-ignore @@ -246,7 +248,7 @@ export class WebhookController { // Check for existing DM (2 participants, no name) before creating const participantIds = participants.map((p) => p.id); const isDM = participantIds.length === 2 && !local.data.name; - + let chat; if (isDM) { const existingChat = await this.chatService.findChatByParticipants(participantIds);