Add channel-scoped conversations for iMessage, WhatsApp, and email
Revert get_conversation_for_user to use Conversation.get() with MultipleObjectsReturned fallback. Add channel field to Conversation model and get_conversation_for_channel helper so each messaging channel gets its own isolated conversation per user. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,7 @@ class Conversation(Model):
|
||||
user: fields.ForeignKeyRelation = fields.ForeignKeyField(
|
||||
"models.User", related_name="conversations", null=True
|
||||
)
|
||||
channel = fields.CharField(max_length=20, default="web", null=True)
|
||||
|
||||
class Meta:
|
||||
table = "conversations"
|
||||
|
||||
Reference in New Issue
Block a user