MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / serializeThread

Function serializeThread

packages/serializers/src/thread.ts:26–41  ·  view source on GitHub ↗
({
  closeAt,
  firstManagerReplyAt,
  firstUserReplyAt,
  createdAt,
  updatedAt,
  ...thread
}: any)

Source from the content-addressed store, hash-verified

24}
25
26export 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
43export function createThreadImitation({
44 message,

Callers 11

thread.test.tsFile · 0.90
index.test.tsFile · 0.90
pushToTypesenseFunction · 0.90
createFunction · 0.90
threadGetServerSidePropsFunction · 0.90
getMethod · 0.90
getMethod · 0.90
updateMethod · 0.90
createMethod · 0.90
addMessageFunction · 0.90
threads.tsFile · 0.90

Calls 2

serializeChannelFunction · 0.90
serializeMessagesFunction · 0.85

Tested by

no test coverage detected