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:
@@ -10,10 +10,19 @@ async def create_message(
|
||||
*,
|
||||
chat_id: int,
|
||||
sender_id: int,
|
||||
reply_to_message_id: int | None,
|
||||
forwarded_from_message_id: int | None,
|
||||
message_type: MessageType,
|
||||
text: str | None,
|
||||
) -> Message:
|
||||
message = Message(chat_id=chat_id, sender_id=sender_id, type=message_type, text=text)
|
||||
message = Message(
|
||||
chat_id=chat_id,
|
||||
sender_id=sender_id,
|
||||
reply_to_message_id=reply_to_message_id,
|
||||
forwarded_from_message_id=forwarded_from_message_id,
|
||||
type=message_type,
|
||||
text=text,
|
||||
)
|
||||
db.add(message)
|
||||
await db.flush()
|
||||
return message
|
||||
|
||||
Reference in New Issue
Block a user