Skip to content

Commit

Permalink
fix: call-offer optional values
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharking committed Dec 13, 2024
1 parent b502dc8 commit 8225ec5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/model/src/messages/calls/CallOfferRequestMessage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Expose } from 'class-transformer'
import { DateParser } from '@credo-ts/core/build/utils/transformers'
import { Expose, Transform } from 'class-transformer'
import { IsOptional, IsString } from 'class-validator'

import { BaseMessage, BaseMessageOptions } from '../BaseMessage'
Expand Down Expand Up @@ -31,9 +32,11 @@ export class CallOfferRequestMessage extends BaseMessage {
public static readonly type = MessageType.CallOfferRequestMessage

@IsOptional()
@Transform(({ value }) => value ? DateParser(value) : undefined)
public offerExpirationTime?: Date

@IsOptional()
@Transform(({ value }) => value ? DateParser(value) : undefined)
public offerStartTime?: Date

@Expose()
Expand Down

0 comments on commit 8225ec5

Please sign in to comment.