diff --git a/livesync/indico_livesync/handler.py b/livesync/indico_livesync/handler.py index f837c10..b3908c0 100644 --- a/livesync/indico_livesync/handler.py +++ b/livesync/indico_livesync/handler.py @@ -69,6 +69,10 @@ def connect_signals(plugin): plugin.connect(signals.category.domain_access_revoked, _domain_changed) plugin.connect(signals.event.domain_access_granted, _domain_changed) plugin.connect(signals.event.domain_access_revoked, _domain_changed) + # notes + plugin.connect(signals.event.notes.note_added, _note_changed) + plugin.connect(signals.event.notes.note_deleted, _note_changed) + plugin.connect(signals.event.notes.note_modified, _note_changed) def _moved(obj, old_parent, new_parent, **kwargs): @@ -115,6 +119,13 @@ def _domain_changed(obj, **kwargs): _register_change(obj, ChangeType.protection_changed) +def _note_changed(note, **kwargs): + obj = note.linked_object + if isinstance(obj, Session): + obj = ConferenceHolder().getById(note.event_id) + _register_change(obj, ChangeType.data_changed) + + def _apply_changes(sender, **kwargs): if not hasattr(g, 'livesync_changes'): return diff --git a/livesync/setup.py b/livesync/setup.py index ed7ef2e..f0f39b3 100644 --- a/livesync/setup.py +++ b/livesync/setup.py @@ -21,7 +21,7 @@ from setuptools import setup, find_packages setup( name='indico_livesync', - version='0.3', + version='0.4', url='https://github.com/indico/indico-plugins', license='https://www.gnu.org/licenses/gpl-3.0.txt', author='Indico Team', @@ -31,7 +31,7 @@ setup( include_package_data=True, platforms='any', install_requires=[ - 'indico>=1.9.3' + 'indico>=1.9.4' ], classifiers=[ 'Environment :: Plugins',