Skip to content

Safeguard y.js reconnect #3921

@juliusknorr

Description

@juliusknorr

Thinking about the y.js web socket reconnect that happens to cause some troubles, I think we should also ensure that a reconnect is only reusing the existing y.js state on the frontend if we know for sure that the document hasn't been reset in the meantime on the server (as this might still happen on the background job).

My suggestion would be to store the timestamp of the initial creation in oc_text_documents and make sure to compare that in the reconnect logic somehow. If the initial creation time is different we reload the full editor.

@max-nextcloud What do you think about that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ☑️ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions