feat: add reply/forward/pin message flow across backend and web
Some checks failed
CI / test (push) Failing after 24s
Some checks failed
CI / test (push) Failing after 24s
- add reply_to/forwarded_from message fields and chat pinned_message field - add forward and pin APIs plus reply support in message create - wire web actions: Reply, Fwd, Pin and reply composer state - fix spam policy bug: allow repeated identical messages, keep rate limiting
This commit is contained in:
@@ -12,6 +12,8 @@ class MessageRead(BaseModel):
|
||||
id: int
|
||||
chat_id: int
|
||||
sender_id: int
|
||||
reply_to_message_id: int | None
|
||||
forwarded_from_message_id: int | None
|
||||
type: MessageType
|
||||
text: str | None
|
||||
created_at: datetime
|
||||
@@ -23,6 +25,7 @@ class MessageCreateRequest(BaseModel):
|
||||
type: MessageType = MessageType.TEXT
|
||||
text: str | None = Field(default=None, max_length=4096)
|
||||
client_message_id: str | None = Field(default=None, min_length=8, max_length=64)
|
||||
reply_to_message_id: int | None = None
|
||||
|
||||
|
||||
class MessageUpdateRequest(BaseModel):
|
||||
@@ -33,3 +36,7 @@ class MessageStatusUpdateRequest(BaseModel):
|
||||
chat_id: int
|
||||
message_id: int
|
||||
status: Literal["message_delivered", "message_read"]
|
||||
|
||||
|
||||
class MessageForwardRequest(BaseModel):
|
||||
target_chat_id: int
|
||||
|
||||
Reference in New Issue
Block a user