def group_member_removed(sender, instance, **kwargs): group = instance.group user = instance.user conversation = Conversation.objects.get_for_target(group) if conversation: conversation.leave(user) stats.group_left(group)
def group_member_removed(sender, instance, **kwargs): """When a user is removed from a conversation we will notify them.""" group = instance.group user = instance.user conversation = Conversation.objects.get_for_target(group) if conversation: conversation.leave(user) stats.group_left(group)