def already_sent_mirrored_message_id(message: Message) -> Optional[int]:
    if (message.recipient.type == Recipient.HUDDLE):
        time_window = datetime.timedelta(seconds=10)
    else:
        time_window = datetime.timedelta(seconds=0)
    query = Message.objects.filter(sender=message.sender, recipient=message.recipient, content=message.content, sending_client=message.sending_client, date_sent__gte=(message.date_sent - time_window), date_sent__lte=(message.date_sent + time_window))
    messages = filter_by_exact_message_topic(query=query, message=message)
    if messages.exists():
        return messages[0].id
    return None
def already_sent_mirrored_message_id(message: Message) -> Optional[int]:
    if (message.recipient.type == Recipient.HUDDLE):
        time_window = datetime.timedelta(seconds=10)
    else:
        time_window = datetime.timedelta(seconds=0)
    query = Message.objects.filter(sender=message.sender, recipient=message.recipient, content=message.content, sending_client=message.sending_client, date_sent__gte=(message.date_sent - time_window), date_sent__lte=(message.date_sent + time_window))
    messages = filter_by_exact_message_topic(query=query, message=message)
    if messages.exists():
        return messages[0].id
    return None