Skip to content

Commit

Permalink
Auto config video component (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
odkhang authored Dec 6, 2024
1 parent ddff339 commit b55022c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pretix/eventyay_common/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def send_event_webhook(self, user_id, event, action):
"locales": event.get("locales"),
"user_email": user.email,
"action": action,
"is_video_creation": event.get("is_video_creation"),
}
headers = get_header_token(user_id)

Expand Down Expand Up @@ -166,6 +167,9 @@ def create_world(self, is_video_creation, event_data):
"title": title,
"timezone": event_timezone,
"locale": locale,
"traits": {
'attendee': 'eventyay-video-event-{}'.format(event_slug),
}
}

headers = {"Authorization": "Bearer " + token}
Expand Down
3 changes: 3 additions & 0 deletions src/pretix/eventyay_common/views/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ def done(self, form_list, form_dict, **kwargs):
"timezone": str(basics_data.get("timezone")),
"locale": basics_data.get("locale"),
"locales": foundation_data.get("locales"),
"is_video_creation": foundation_data.get("is_video_creation"),
}
send_event_webhook.delay(
user_id=self.request.user.id, event=event_dict, action="create"
Expand Down Expand Up @@ -268,6 +269,7 @@ def done(self, form_list, form_dict, **kwargs):
"timezone": str(basics_data.get("timezone")),
"locale": event.settings.locale,
"locales": event.settings.locales,
"is_video_creation": foundation_data.get("is_video_creation"),
}
send_event_webhook.delay(
user_id=self.request.user.id, event=event_dict, action="create"
Expand Down Expand Up @@ -408,6 +410,7 @@ def post(self, request, *args, **kwargs):
"timezone": str(event.settings.timezone),
"locale": event.settings.locale,
"locales": event.settings.locales,
"is_video_creation": event.is_video_creation,
}
send_event_webhook.delay(
user_id=self.request.user.id, event=event_dict, action="update"
Expand Down

0 comments on commit b55022c

Please sign in to comment.