Increase security and reformat
This commit is contained in:
@@ -4,22 +4,22 @@ import re
|
||||
from asgiref.sync import sync_to_async
|
||||
from django.conf import settings
|
||||
|
||||
from core.assist.engine import process_inbound_assist
|
||||
from core.clients import transport
|
||||
from core.events import event_ledger_status
|
||||
from core.clients.instagram import InstagramClient
|
||||
from core.clients.signal import SignalClient
|
||||
from core.clients.whatsapp import WhatsAppClient
|
||||
from core.clients.xmpp import XMPPClient
|
||||
from core.assist.engine import process_inbound_assist
|
||||
from core.commands.base import CommandContext
|
||||
from core.commands.engine import process_inbound_message
|
||||
from core.events import event_ledger_status
|
||||
from core.messaging import history
|
||||
from core.models import PersonIdentifier
|
||||
from core.observability.tracing import ensure_trace_id
|
||||
from core.presence import AvailabilitySignal, record_native_signal
|
||||
from core.realtime.typing_state import set_person_typing_state
|
||||
from core.translation.engine import process_inbound_translation
|
||||
from core.util import logs
|
||||
from core.observability.tracing import ensure_trace_id
|
||||
|
||||
|
||||
class UnifiedRouter(object):
|
||||
@@ -119,7 +119,9 @@ class UnifiedRouter(object):
|
||||
return
|
||||
identifiers = await self._resolve_identifier_objects(protocol, identifier)
|
||||
if identifiers:
|
||||
outgoing = str(getattr(local_message, "custom_author", "") or "").strip().upper() in {
|
||||
outgoing = str(
|
||||
getattr(local_message, "custom_author", "") or ""
|
||||
).strip().upper() in {
|
||||
"USER",
|
||||
"BOT",
|
||||
}
|
||||
@@ -268,7 +270,9 @@ class UnifiedRouter(object):
|
||||
ts=int(read_ts or 0),
|
||||
payload={
|
||||
"origin": "router.message_read",
|
||||
"message_timestamps": [int(v) for v in list(timestamps or []) if str(v).isdigit()],
|
||||
"message_timestamps": [
|
||||
int(v) for v in list(timestamps or []) if str(v).isdigit()
|
||||
],
|
||||
"read_by": str(read_by or row.identifier),
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user