def METHOD_NAME(request, thread, new_participant):
    """adds single participant to thread, registers this on the event"""
    add_participants(request.user, thread, [new_participant])
    if request.user == new_participant:
        record_event(request, thread, "entered_thread")
    else:
        record_event(
            request,
            thread,
            "added_participant",
            {
                "user": {
                    "id": new_participant.id,
                    "username": new_participant.username,
                    "url": new_participant.get_absolute_url(),
                }
            },
        )