mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-07-21 09:02:57 +02:00
Add channel name to broadcasts
This commit is contained in:
@@ -196,6 +196,7 @@ class Message(BaseModel):
|
||||
outgoing: bool = False
|
||||
acked: int = 0
|
||||
sender_name: str | None = None
|
||||
channel_name: str | None = None
|
||||
|
||||
|
||||
class MessagesAroundResponse(BaseModel):
|
||||
|
||||
@@ -208,6 +208,7 @@ async def create_message_from_decrypted(
|
||||
paths=paths,
|
||||
sender_name=sender,
|
||||
sender_key=resolved_sender_key,
|
||||
channel_name=channel_name,
|
||||
).model_dump(),
|
||||
realtime=trigger_bot,
|
||||
)
|
||||
@@ -301,6 +302,7 @@ async def create_dm_message_from_decrypted(
|
||||
paths = [MessagePath(path=path or "", received_at=received)] if path is not None else None
|
||||
|
||||
# Broadcast new message to connected clients (and fanout modules when realtime)
|
||||
sender_name = contact.name if contact and not outgoing else None
|
||||
broadcast_event(
|
||||
"message",
|
||||
Message(
|
||||
|
||||
Reference in New Issue
Block a user