Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Message deletion #75

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Implement Message deletion #75

merged 1 commit into from
Jun 14, 2024

Conversation

pamella
Copy link
Collaborator

@pamella pamella commented Jun 13, 2024

Issues

Resolves #60

Description

  • Implement Message deletion

Warning

Ideally, we should delete all existing messages before testing this feature. That's because we are now saving the message ID which is used in the message deletion flow.

Weather Assistant

Screencast.from.13-06-2024.19.09.27.webm

@pamella pamella requested a review from fjsj June 13, 2024 22:14
Message(thread_id=self._thread_id, message=message_to_dict(message))
for message in messages
]
)

created_messages = Message.objects.bulk_create(message_objects)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I small speed up can be gained by creating the messages with empty data first, then actually bulk_updating with "message".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That means not having message=message_to_dict(message) above, only after creation.

@fjsj fjsj merged commit 8bace80 into main Jun 14, 2024
6 checks passed
@fjsj fjsj deleted the feat/message-delete branch June 14, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support message deletion
2 participants