Косметические правки по фронту, раскатка приложения в продакшн версии, исправление бага с созданием контакта

This commit is contained in:
mi
2026-09-03 11:34:25 +03:00
parent f989097484
commit 465a70d488
18 changed files with 528 additions and 139 deletions
@@ -30,7 +30,9 @@ from app.notification_service import expire_notifications
from app.realtime import RealtimeFanout
from app.services import (
ensure_delivery_outbox,
load_active_client_profile,
load_settings,
openlines_delivery_payload,
publish_dialog_status,
publish_message_status,
)
@@ -189,37 +191,18 @@ async def safety_once(
else None
)
if dialog and user:
profile = await load_active_client_profile(session, user.id)
await ensure_delivery_outbox(
session,
message_id=message.id,
external_chat_id=dialog.id,
payload_json={
"message_id": str(message.id),
"external_chat_id": str(dialog.id),
"occurred_at": message.occurred_at.isoformat(),
"user": {
"id": str(user.id),
"display_name": user.phone_number,
},
"message": {
"content_kind": message.content_kind,
"text": message.text,
"files": (
[
{
"attachment_id": str(attachment.id),
"name": attachment.safe_file_name,
"mime_type": attachment.mime_type,
"size_bytes": attachment.size_bytes,
"_storage_bucket": attachment.storage_bucket,
"_object_key": attachment.object_key,
}
]
if attachment
else []
),
},
},
payload_json=openlines_delivery_payload(
message=message,
dialog_id=dialog.id,
user=user,
profile=profile,
attachment=attachment,
),
next_attempt_at=datetime.now(UTC),
)
elif verdict["_status"] == 403 and message: