Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add drop_author parameter in methods/.../forward_messages.py, types.Message.reactions edited #1235

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kvrvgv
Copy link
Contributor

@kvrvgv kvrvgv commented Mar 13, 2023

Issue #1211

My manual tests

Expect: Default forwarding

  • 1 message with drop_author (D.A.) = None (default) - OK
  • list of messages, D.A. = None (default) - OK

Expect: Same behavior

  • 1 message, D.A. = False - OK
  • list of messages, D.A. = False (default) - OK

Expect: Forward without author account

  • 1 message, D.A. = True - OK
  • list of messages, D.A. = True (default) - OK

@@ -32,7 +32,8 @@ async def forward_messages(
message_ids: Union[int, Iterable[int]],
disable_notification: bool = None,
schedule_date: datetime = None,
protect_content: bool = None
protect_content: bool = None,
drop_author: bool = None
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function parameter
if True - author will be hidden

@@ -62,6 +63,9 @@ async def forward_messages(
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.

drop_author (``bool``, *optional*):
Forwards messages without quoting the original author
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring for new param

@@ -87,7 +91,8 @@ async def forward_messages(
silent=disable_notification or None,
random_id=[self.rnd_id() for _ in message_ids],
schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content
noforwards=protect_content,
drop_author=drop_author
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass parameter to raw.functions.messages.ForwardMessages

self.reactions = reactions
self._reactions = reactions

@property
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

изображение

@kvrvgv kvrvgv changed the title add drop_author parameter in methods/.../forward_messages.py add drop_author parameter in methods/.../forward_messages.py, types.Message.reactions edited May 5, 2023
@lcd1232
Copy link

lcd1232 commented May 22, 2023

@delivrance could you merge it? I also tested it and it works without any issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants