mirror of
https://github.com/umap-project/umap.git
synced 2025-05-04 05:31:50 +02:00
wip(sync): do not consume own payloads
django-channels broadcast even to the sender, so let's drop that payloads.
This commit is contained in:
parent
4cc9540119
commit
f7572c4893
1 changed files with 2 additions and 1 deletions
|
@ -124,7 +124,7 @@ export class SyncEngine {
|
|||
|
||||
if (this.offline) return
|
||||
if (this.transport) {
|
||||
this.transport.send('OperationMessage', message)
|
||||
this.transport.send('OperationMessage', { sender: this.uuid, ...message })
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,6 +177,7 @@ export class SyncEngine {
|
|||
* @param {Object} payload
|
||||
*/
|
||||
onOperationMessage(payload) {
|
||||
if (payload.sender === this.uuid) return
|
||||
this._operations.storeRemoteOperations([payload])
|
||||
this._applyOperation(payload)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue