Exemple #1
0
def activity_handler_new_participant(sender, instance, created, **kwargs):
    if created:
        action.send(instance.created_by, verb=verbs.ADD, action_object=instance, target=instance.task)

        if not instance.responded and not instance.accepted:
            send_new_task_invitation_email.delay(instance.id)

        if instance.accepted:
            update_task_periodic_updates.delay(instance.task.id)
def activity_handler_new_participant(sender, instance, created, **kwargs):
    if created:
        action.send(instance.created_by, verb=verbs.ADD, action_object=instance, target=instance.task)

        if instance.status == STATUS_INITIAL:
            notify_task_invitation_email.delay(instance.id)

        if instance.status == STATUS_ACCEPTED:
            update_task_periodic_updates.delay(instance.task.id)
Exemple #3
0
def activity_handler_new_participant(sender, instance, created, **kwargs):
    if created:
        action.send(instance.created_by, verb=verbs.ADD, action_object=instance, target=instance.task)

        if not instance.responded and not instance.accepted:
            send_new_task_invitation_email.delay(instance.id)

        if instance.accepted:
            update_task_periodic_updates.delay(instance.task.id)
Exemple #4
0
def activity_handler_participation_response(sender, participation, **kwargs):
    if participation.accepted or participation.responded:
        status_verb = participation.accepted and verbs.ACCEPT or verbs.REJECT
        action.send(
            participation.task.user, verb=status_verb, action_object=participation, target=participation.task
        )
        notify_task_invitation_response.delay(participation.id)

        if participation.accepted:
            update_task_periodic_updates.delay(participation.task.id)
def activity_handler_participation_response(sender, participation, **kwargs):
    if participation.status != STATUS_INITIAL:
        status_verb = participation.status == STATUS_ACCEPTED and verbs.ACCEPT or verbs.REJECT
        action.send(
            participation.task.user, verb=status_verb, action_object=participation, target=participation.task
        )
        notify_task_invitation_response.delay(participation.id)

        if participation.status == STATUS_ACCEPTED:
            update_task_periodic_updates.delay(participation.task.id)
Exemple #6
0
def activity_handler_participation_response(sender, participation, **kwargs):
    if participation.accepted or participation.responded:
        status_verb = participation.accepted and verbs.ACCEPT or verbs.REJECT
        action.send(
            participation.task.user, verb=status_verb, action_object=participation, target=participation.task
        )
        send_new_task_invitation_response_email.delay(participation.id)

        if participation.accepted:
            update_task_periodic_updates.delay(participation.task.id)