1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-26 15:26:19 +00:00
This commit is contained in:
lian
2021-11-08 14:50:18 +08:00
parent d40082f675
commit 6f2350c196

View File

@@ -81,12 +81,22 @@ def onlyoffice_editor_callback(request):
doc_key = post_data.get('key')
doc_info_from_cache = cache.get("ONLYOFFICE_%s" % doc_key)
if not doc_info_from_cache:
logger.error('can not get doc_info from cache by doc_key {}'.format(doc_key))
logger.error('status {}: can not get doc_info from cache by doc_key {}'.format(status, doc_key))
logger.info(post_data)
return HttpResponse('{"error": 1}')
if status == 1:
logger.info(post_data)
logger.info('status {}: {}'.format(status, post_data))
actions = post_data.get('actions')
if actions:
if actions[0].get('type') == 1:
logger.info('status {}: user connects to the document co-editing'.format(status))
if actions[0].get('type') == 0:
logger.info('status {}: user disconnects to the document co-editing'.format(status))
return HttpResponse('{"error": 0}')
if status not in (2, 4, 6):