Skip to content

Commit f24b29f

Browse files
final PR on my end sorry for another commit.
restored a missing line , Fix conversation ID handling
1 parent e89b359 commit f24b29f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Http/Controllers/LJPcCalendarModuleAPIController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ public function createEventFromConversation( int $conversation, Request $request
852852

853853
$userId = $this->requireAuthUserId();
854854

855-
$conversationObj = Conversation::find( $conversation );
855+
$conversationObj = Conversation::find( $conversation );
856856

857857
$start = ( new DateTimeImmutable( $validatedData['start'] ) )->setTimezone( new DateTimeZone( 'UTC' ) );
858858
$end = ( new DateTimeImmutable( $validatedData['end'] ) )->setTimezone( new DateTimeZone( 'UTC' ) );
@@ -1211,7 +1211,7 @@ public function createEventFromAttachment( Request $request ) {
12111211
$customFields = [];
12121212
}
12131213

1214-
$customFields['conversation_id'] = isset($conversation) ? ($conversation) : null;
1214+
$customFields['conversation_id'] = $conversation ? $conversation->id : null;
12151215
$customFields['author_id'] = $userId;
12161216

12171217
$calendarItem->custom_fields = $customFields;

0 commit comments

Comments
 (0)