({
closeAt,
firstManagerReplyAt,
firstUserReplyAt,
createdAt,
updatedAt,
...thread
}: any)
| 24 | } |
| 25 | |
| 26 | export function serializeThread({ |
| 27 | closeAt, |
| 28 | firstManagerReplyAt, |
| 29 | firstUserReplyAt, |
| 30 | createdAt, |
| 31 | updatedAt, |
| 32 | ...thread |
| 33 | }: any): SerializedThread { |
| 34 | return { |
| 35 | ...thread, |
| 36 | sentAt: thread.sentAt.toString(), |
| 37 | lastReplyAt: thread.lastReplyAt?.toString() || thread.sentAt.toString(), |
| 38 | channel: thread.channel ? serializeChannel(thread.channel) : null, |
| 39 | messages: serializeMessages(thread.messages), |
| 40 | }; |
| 41 | } |
| 42 | |
| 43 | export function createThreadImitation({ |
| 44 | message, |
no test coverage detected