Skip to content

Commit

Permalink
Invite only meetups
Browse files Browse the repository at this point in the history
  • Loading branch information
fatsbrown authored Jul 30, 2024
1 parent d2fa18a commit 9d8202f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zwift_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2686,7 +2686,9 @@ def api_private_event_feed():
past_events = request.args.get('organizer_only_past_events') == 'true'
ret = []
for pe in ActualPrivateEvents().values():
if stime_to_timestamp(pe['eventStart']) > start_date or (past_events and int(pe['organizerProfileId']) == current_user.player_id):
if ((current_user.player_id in pe['invitedProfileIds'] or current_user.player_id == pe['organizerProfileId']) \
and stime_to_timestamp(pe['eventStart']) > start_date) \
or (past_events and pe['organizerProfileId'] == current_user.player_id):
ret.append(clone_and_append_social(current_user.player_id, pe))
if request.headers['Accept'] == 'application/json':
return jsonify(ret)
Expand Down

0 comments on commit 9d8202f

Please sign in to comment.