Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add favorites to Outlook calendar #184

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e6a5850
Add favorite events to the calendar
alexiri Nov 15, 2024
cc1b8d3
Add events in favorite categories to the calendar
alexiri Nov 15, 2024
04b54e8
Make it configurable
alexiri Nov 15, 2024
d53d397
Fix event deletion
alexiri Nov 15, 2024
dadad60
Fix time changes handler
alexiri Nov 15, 2024
c576031
Listen for event.created+restored
alexiri Nov 15, 2024
21ffb1d
Don't leak information about events the user can't see
alexiri Nov 15, 2024
987b3ee
Update outlook/indico_outlook/migrations/20241115_2151_636d44cb7a7c_a…
alexiri Nov 16, 2024
9d32b30
Update outlook/indico_outlook/migrations/20241115_2151_636d44cb7a7c_a…
alexiri Nov 16, 2024
82bbf22
Make favorites option work as intended
alexiri Nov 16, 2024
20d72b3
Separate config options for favorite events and categories
alexiri Nov 17, 2024
8823fe6
Add another config option for current behavior
alexiri Nov 17, 2024
5cd016e
Rename function to better reflect what it does
alexiri Nov 17, 2024
de7e077
Reduce recursivity
alexiri Nov 17, 2024
1ebc767
Rewrite help for clarity
alexiri Nov 17, 2024
67cce9b
Recurse categories but respecting visibility
alexiri Nov 23, 2024
10779ee
Deal with categories being favorited/unfavorited
alexiri Nov 23, 2024
6dfe24c
Linter
alexiri Nov 24, 2024
651e584
Update outlook/indico_outlook/plugin.py
alexiri Nov 25, 2024
5b7468a
Ignore category visibility/protection changes
alexiri Nov 25, 2024
6261374
Fix linter error
alexiri Dec 13, 2024
cca0992
Update outlook/indico_outlook/plugin.py
alexiri Mar 25, 2025
2690df3
No need to iterate over the categories if the user isn't tracking them
alexiri Mar 29, 2025
8c66133
Don't create a new action
alexiri Mar 29, 2025
04c5130
Allow limiting the number of events to edit at once
alexiri Mar 29, 2025
2dc09ad
Change default for favorite_categories
alexiri Mar 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix time changes handler
alexiri authored and ThiefMaster committed Mar 28, 2025
commit dadad607f867351e8697b1284f02a0be52256914
11 changes: 7 additions & 4 deletions outlook/indico_outlook/plugin.py
Original file line number Diff line number Diff line change
@@ -232,7 +232,8 @@ def event_registration_form_deleted(self, registration_form, **kwargs):
self.logger.info('Registration removed (form deleted): removing %s in %s', registration.user, event)

def event_updated(self, event, changes, **kwargs):
if not changes.keys() & {'title', 'description', 'location_data', 'person_links'}:
monitored_keys = {'title', 'description', 'location_data', 'person_links', 'start_dt', 'end_dt', 'duration'}
if not changes.keys() & monitored_keys:
return

# Registered users need to be informed about changes
@@ -251,9 +252,11 @@ def event_updated(self, event, changes, **kwargs):

def event_times_changed(self, sender, obj, **kwargs):
event = obj
for user in get_participating_users(event):
self.logger.info('Event time change: updating %s in %r', user, event)
self._record_change(event, user, OutlookAction.update)
changes = kwargs['changes']
del kwargs['changes']

self.logger.info('Event time change: updating %r: %r', event, changes)
self.event_updated(event, changes, **kwargs)

def event_deleted(self, event, **kwargs):
users_to_update = set(get_participating_users(event))