From 9d8202f2651beddb5ed691f9982bd539f9c4dd4f Mon Sep 17 00:00:00 2001 From: fatsbrown <123950591+fatsbrown@users.noreply.github.com> Date: Tue, 30 Jul 2024 11:07:42 -0300 Subject: [PATCH] Invite only meetups --- zwift_offline.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zwift_offline.py b/zwift_offline.py index e8dbf35d..192acac0 100644 --- a/zwift_offline.py +++ b/zwift_offline.py @@ -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)