def do_delete_messages_by_sender(user: UserProfile) -> None:
    message_ids = list(Message.objects.filter(sender=user).values_list('id', flat=True).order_by('id'))
    if message_ids:
        move_messages_to_archive(message_ids, chunk_size=retention.STREAM_MESSAGE_BATCH_SIZE)
def do_delete_messages_by_sender(user: UserProfile) -> None:
    message_ids = list(Message.objects.filter(sender=user).values_list('id', flat=True).order_by('id'))
    if message_ids:
        move_messages_to_archive(message_ids, chunk_size=retention.STREAM_MESSAGE_BATCH_SIZE)