fix: channel thread

This commit is contained in:
Timothy Jaeryang Baek 2025-01-02 20:48:50 -08:00
parent 3e9c92729d
commit b2b56d14cb

View File

@ -189,9 +189,11 @@ class MessageTable:
.all()
)
return [
MessageModel.model_validate(message) for message in all_messages
] + [MessageModel.model_validate(message)]
# If length of all_messages is less than limit, then add the parent message
if len(all_messages) < limit:
all_messages.append(message)
return [MessageModel.model_validate(message) for message in all_messages]
def update_message_by_id(
self, id: str, form_data: MessageForm