Ejemplo n.º 1
0
def notify_user_payment_error(action_type, registration, **kwargs):
    group = group_for_user(registration.user)
    kwargs["event_id"] = registration.event.id
    serializer = RegistrationPaymentReadErrorSerializer(
        {"type": action_type, "payload": registration, "meta": kwargs},
        context={"user": registration.user},
    )
    notify_group(group, serializer.data)
Ejemplo n.º 2
0
def notify_user_payment(action_type, registration, **kwargs):
    group = group_for_user(registration.user)
    kwargs['event_id'] = registration.event.id
    serializer = RegistrationPaymentReadSocketSerializer(
        {
            'type': action_type,
            'payload': registration,
            'meta': kwargs
        },
        context={'user': registration.user})
    notify_group(group, serializer.data)
Ejemplo n.º 3
0
def find_groups(user):
    return ["global", group_for_user(user)] + find_event_groups(user)