MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / Message_OnInsert

Function Message_OnInsert

templates/chat-console-cs/Program.cs:133–142  ·  view source on GitHub ↗
(EventContext ctx, Message insertedValue)

Source from the content-addressed store, hash-verified

131
132/// Our `Message.OnInsert` callback: print new messages.
133void Message_OnInsert(EventContext ctx, Message insertedValue)
134{
135 // We are filtering out messages inserted during the subscription being applied,
136 // since we will be printing those in the OnSubscriptionApplied callback,
137 // where we will be able to first sort the messages before printing.
138 if (ctx.Event is not Event<Reducer>.SubscribeApplied)
139 {
140 PrintMessage(ctx.Db, insertedValue);
141 }
142}
143
144void PrintMessage(RemoteTables tables, Message message)
145{

Callers

nothing calls this directly

Calls 1

PrintMessageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…