Dear OnlyOffice Team,
I’m encountering an issue and would appreciate your guidance: How can I determine whether a callback triggered by OnlyOffice is initiated after all users exit editing or is an automatic save?
The reason for distinguishing these scenarios is that I need to save user input periodically (every few minutes) while also generating a new version only after all users finish editing. Through research, I found these resources:
- auto force save setting · Issue #751 · ONLYOFFICE/onlyoffice-nextcloud · GitHub
- Configuring ONLYOFFICE Docs Developer Edition
I learned that enabling services.CoAuthoring.autoAssembly = true
should theoretically trigger periodic callbacks. However, this raises a new challenge: How do I differentiate between callbacks triggered by autoAssembly
versus those triggered by users closing the editor? I require this distinction to apply different business logic for each case.
After reviewing the official documentation:
I could not find any method to distinguish between these two callback types.
Looking forward to your response.
---------------- The above content was translated via DeepSeek. Original text -------------------
Hi OnlyOffice 的朋友:
我遇到了一个问题不知道如何解决:如何判断 OnlyOffice 发起的 callback 的触发场景,是用户都退出编辑后发起的还是自动自动保存发起的?
之所以需要区分主要是我期望每隔几分钟保存一次用户的输入结果,并且当所有用户都完成编辑之后生成新版本。 我通过搜索,在网上找到了资料:
- https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/751,
- Configuring ONLYOFFICE Docs Developer Edition
进而知道了可以通过设置: **services.CoAuthoring.autoAssembly = true ** 启用这个功能,这样理论上来说会周期性的触发 callback。 但这样就
面临一个问题:如何区分是 autoAssembly 触发的 callback 还是用户完成编辑器后触发的? 我需求区分这两者做不同的业务处理。 我翻阅了官方文档:
没有找到如何区分这两者。
期待您的回复。