File tree Expand file tree Collapse file tree
platforms/pictique-api/src/controllers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ export class WebhookController {
174174 }
175175
176176 if ( localId ) {
177+ local . data . text = local . data . text ?? "" ;
177178 const post = await this . postsService . findById ( localId ) ;
178179 if ( ! post ) return res . status ( 500 ) . send ( ) ;
179180 for ( const key of Object . keys ( local . data ) ) {
@@ -188,6 +189,7 @@ export class WebhookController {
188189 await this . postsService . postRepository . save ( post ) ;
189190 } else {
190191 console . log ( "Creating new post" ) ;
192+ local . data . text = local . data . text ?? "" ;
191193 const post = await this . postsService . createPost (
192194 author ?. id as string ,
193195 // @ts -ignore
@@ -246,7 +248,7 @@ export class WebhookController {
246248 // Check for existing DM (2 participants, no name) before creating
247249 const participantIds = participants . map ( ( p ) => p . id ) ;
248250 const isDM = participantIds . length === 2 && ! local . data . name ;
249-
251+
250252 let chat ;
251253 if ( isDM ) {
252254 const existingChat = await this . chatService . findChatByParticipants ( participantIds ) ;
You can’t perform that action at this time.
0 commit comments