Files
chatballs/apps/backend/hub_platform/conversations/admin.py
T
AndreyandClaude Opus 4.8 f0b03d91bc feat(conversations): M2a — live MAX inbound -> AI -> reply
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>
2026-06-28 11:42:11 +03:00

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",)