Skip to content

Commit

Permalink
Log everything if no context in onStoreDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
eriksson-daniel committed Feb 13, 2025
1 parent 0ee1600 commit a488fd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/plugins/crdt/collaboration-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,14 @@ export const collaborationServer = Server.configure({
logContext('Loaded state/update applied', context, 'debug');
},

onStoreDocument: async ({ context, document }) => {
onStoreDocument: async ({ context, document, ...rest }) => {
if (!isConnectionContext(context)) {
secureLog.debug({
msg: 'Tried to store document without context',
data: {
document: JSON.stringify(getDocumentJson(document)),
context: JSON.stringify({ ...context, abortController: undefined }),
rest: JSON.stringify(rest),
},
});

Expand Down

0 comments on commit a488fd5

Please sign in to comment.