Skip to content

Commit

Permalink
fix(file-upload): Properly filter fields for client sync
Browse files Browse the repository at this point in the history
fix #3
  • Loading branch information
jourdain committed Oct 26, 2022
1 parent 9c34685 commit 1656aab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions trame_server/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from wslink import register as exportRpc
from wslink.websocket import ServerProtocol

from trame_server.utils import logger
from trame_server.utils import logger, clean_state
from trame_server.state import TRAME_NON_INIT_VALUE


Expand Down Expand Up @@ -175,7 +175,9 @@ def update_state(self, changes):
client_state[change["key"]] = change.get("value")

# Push to other clients (collaboration) before flush
self.push_state_change(client_state, skip_last_active_client=True)
self.push_state_change(
clean_state(client_state), skip_last_active_client=True
)

# Update server state
self.server.state.update(client_state)

0 comments on commit 1656aab

Please sign in to comment.