MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / onThreadMessage

Function onThreadMessage

apps/web/ui/ChannelView/index.tsx:725–747  ·  view source on GitHub ↗
(
    threadId: string,
    message: SerializedMessage,
    messageId: string,
    imitationId: string
  )

Source from the content-addressed store, hash-verified

723 };
724
725 function onThreadMessage(
726 threadId: string,
727 message: SerializedMessage,
728 messageId: string,
729 imitationId: string
730 ) {
731 setThreads((threads) => {
732 return threads.map((thread) => {
733 if (thread.id === threadId) {
734 return {
735 ...thread,
736 messages: [
737 ...thread.messages.filter(
738 ({ id }: any) => id !== imitationId && id !== messageId
739 ),
740 message,
741 ],
742 };
743 }
744 return thread;
745 });
746 });
747 }
748
749 function onThreadDrop({
750 source,

Callers

nothing calls this directly

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected