From bcb626c0243d3a7251b37f92907219eca3de542c Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 5 Sep 2021 00:36:37 -0300 Subject: [PATCH] storage: add allowed_mentions to get_message --- litecord/common/messages.py | 1 + litecord/storage.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/litecord/common/messages.py b/litecord/common/messages.py index f2308db..f01a370 100644 --- a/litecord/common/messages.py +++ b/litecord/common/messages.py @@ -131,6 +131,7 @@ async def msg_guild_text_mentions( payload: dict, guild_id: int, mentions_everyone: bool, mentions_here: bool ): """Calculates mention data side-effects.""" + # TODO this should be aware of allowed_mentions channel_id = int(payload["channel_id"]) # calculate the user ids we'll bump the mention count for diff --git a/litecord/storage.py b/litecord/storage.py index d3131d6..1b3b9d8 100644 --- a/litecord/storage.py +++ b/litecord/storage.py @@ -1018,7 +1018,8 @@ class Storage: """ SELECT id::text, channel_id::text, author_id, content, created_at AS timestamp, edited_at AS edited_timestamp, - tts, mention_everyone, nonce, message_type, embeds, flags, message_reference + tts, mention_everyone, nonce, message_type, embeds, flags, + message_reference, allowed_mentions FROM messages WHERE id = $1 """,