-
Notifications
You must be signed in to change notification settings - Fork 0
Live chat/add the models needed to create polls for live chat #1001
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
base: dev
Are you sure you want to change the base?
Live chat/add the models needed to create polls for live chat #1001
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces new models to support live chat poll functionality and updates an existing foreign key for review feedback. Key changes include:
- A migration updating the foreign key relationship in reviewfeedback.
- New models for LiveChatPollOption, LiveChatPoll, and LiveChatPollVote in the chat app.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/chigame/knowledge_base/migrations/0004_alter_reviewfeedback_guide_id.py | Migration to alter the reviewfeedback guide_id foreign key relationship. |
| src/chigame/chat/models.py | New models to implement live chat polls with options and votes. |
sidkama
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good Alex - just curious, why is the Meta class a subclass of LiveChatPollVote? wouldn't it make sense to just have unique_together be an accessible list within LiveChatPollVote instead of its own class? aside from that clarification, this looks good to go pre implementing the actual poll feature in the live chat itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds foundational models for poll functionality within live chats.
- Removes autogenerated header from an existing migration.
- Introduces LiveChatPollOption, LiveChatPoll, and LiveChatPollVote models.
- Establishes relationships: polls belong to live chats, link to options, and enforce unique votes.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/chigame/knowledge_base/migrations/0004_alter_reviewfeedback_guide_id.py | Removed the autogenerated Django migration header. |
| src/chigame/chat/models.py | Added LiveChatPollOption, LiveChatPoll, and LiveChatPollVote models with fields and relationships. |
Comments suppressed due to low confidence (2)
src/chigame/knowledge_base/migrations/0004_alter_reviewfeedback_guide_id.py:1
- [nitpick] Removing the autogenerated migration header reduces auditability; consider retaining it to track migration metadata.
# Generated by Django 4.2.20 on 2025-05-15 18:27
src/chigame/chat/models.py:66
- These new poll models appear without any tests; consider adding unit tests for poll creation, option associations, and vote uniqueness.
class LiveChatPollOption(models.Model):
| return f"{self.user} reacted with {self.content} to message {self.message}" | ||
|
|
||
|
|
||
| class LiveChatPollOption(models.Model): |
Copilot
AI
May 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Implement a str method for LiveChatPollOption (e.g., return self.content) to improve admin and debug readability.
|
Hi @alexandros-lekkas if you don't mind ill hop on and fix the merge conflicts. |
Thank you so much big dawg - appreciate it |
abargher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More merge conflicts here, please take a look.
…-public-private-chat-toggle
On it right now! -- it looks like the errors are steming from a previous commit so im going to revert back to a working commit |
4030fa1 to
6ec794a
Compare
All fixed |
abargher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These commits were already merged, looks like they got swept up in another PR while fixing conflicts.
|
@abargher does that mean we can close this PR? |
This addresses #847. I have added the models needed for poll implementation. @sidkama can you review?