mirror of
https://github.com/dartdavros/chatballs.git
synced 2026-10-10 19:34:59 +03:00
Conversations domain (ADR-HUB-0002/0003/0006): Contact, ConnectionIdentity, Conversation (lifecycle/control_mode/expected_responder + assigned_operator) and Message. Bind a messenger Integration to a Channel (+ poll_marker). MAX transport does long-poll /updates and POST /messages (defensive parsing, raw update logged). Worker now polls MAX connections every 3s and ingests inbound idempotently (InboxEvent): contact/conversation/message, and when the dialog is AI-controlled runs run_channel_turn and replies back to MAX. Verified inbound polling against the live edevs MAX bot (received bot_started). Operator takeover UI is M2b. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
22 lines
661 B
Python
22 lines
661 B
Python
from django.contrib import admin
|
|
|
|
from hub_platform.conversations.models import Contact, Conversation, Message
|
|
|
|
|
|
@admin.register(Conversation)
|
|
class ConversationAdmin(admin.ModelAdmin):
|
|
list_display = ("id", "channel", "contact", "lifecycle", "control_mode", "last_activity_at")
|
|
list_filter = ("lifecycle", "control_mode")
|
|
|
|
|
|
@admin.register(Contact)
|
|
class ContactAdmin(admin.ModelAdmin):
|
|
list_display = ("id", "name", "organization", "created_at")
|
|
search_fields = ("name",)
|
|
|
|
|
|
@admin.register(Message)
|
|
class MessageAdmin(admin.ModelAdmin):
|
|
list_display = ("id", "conversation", "author_type", "created_at")
|
|
list_filter = ("author_type",)
|