Skip to content

Commit

Permalink
fix: add documentName into broadcast message (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
xcfox authored Oct 5, 2023
1 parent 46bcb7a commit 8400928
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/provider/src/HocuspocusProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,16 @@ export class HocuspocusProvider extends EventEmitter {
}

this.mux(() => {
this.broadcast(SyncStepOneMessage, { document: this.document })
this.broadcast(SyncStepTwoMessage, { document: this.document })
this.broadcast(QueryAwarenessMessage, { document: this.document })
this.broadcast(SyncStepOneMessage, { document: this.document, documentName: this.configuration.name })
this.broadcast(SyncStepTwoMessage, { document: this.document, documentName: this.configuration.name })
this.broadcast(QueryAwarenessMessage, { document: this.document, documentName: this.configuration.name })
if (this.awareness) {
this.broadcast(AwarenessMessage, { awareness: this.awareness, clients: [this.document.clientID], document: this.document })
this.broadcast(AwarenessMessage, {
awareness: this.awareness,
clients: [this.document.clientID],
document: this.document,
documentName: this.configuration.name,
})
}
})
}
Expand Down

0 comments on commit 8400928

Please sign in to comment.