fix typing on message_search internal function

This commit is contained in:
Luna 2021-08-29 01:21:04 -03:00
parent 92dba16237
commit 3ed0ff8176
1 changed files with 8 additions and 5 deletions

View File

@ -62,7 +62,9 @@ async def message_search(
if after: if after:
where_clause += f"AND id > {after}" where_clause += f"AND id > {after}"
return await app.db.fetch( return [
row["id"]
for row in await app.db.fetch(
f""" f"""
SELECT id SELECT id
FROM messages FROM messages
@ -72,6 +74,7 @@ async def message_search(
""", """,
channel_id, channel_id,
) )
]
async def around_message_search( async def around_message_search(
@ -120,7 +123,7 @@ async def get_messages(channel_id):
result = [] result = []
for message_id in message_ids: for message_id in message_ids:
msg = await app.storage.get_message(message_id["id"], user_id) msg = await app.storage.get_message(message_id, user_id)
if msg is None: if msg is None:
continue continue