p1: add forward without author option
All checks were successful
CI / test (push) Successful in 21s

This commit is contained in:
2026-03-08 14:11:04 +03:00
parent 5ae5821c20
commit 33e467d2a5
5 changed files with 27 additions and 9 deletions

View File

@@ -42,10 +42,12 @@ class MessageStatusUpdateRequest(BaseModel):
class MessageForwardRequest(BaseModel):
target_chat_id: int
include_author: bool = True
class MessageForwardBulkRequest(BaseModel):
target_chat_ids: list[int] = Field(min_length=1, max_length=20)
include_author: bool = True
class MessageReactionToggleRequest(BaseModel):

View File

@@ -362,7 +362,7 @@ async def forward_message(
chat_id=payload.target_chat_id,
sender_id=sender_id,
reply_to_message_id=None,
forwarded_from_message_id=source.id,
forwarded_from_message_id=source.id if payload.include_author else None,
message_type=source.type,
text=source.text,
)
@@ -403,7 +403,7 @@ async def forward_message_bulk(
chat_id=target_chat_id,
sender_id=sender_id,
reply_to_message_id=None,
forwarded_from_message_id=source.id,
forwarded_from_message_id=source.id if payload.include_author else None,
message_type=source.type,
text=source.text,
)