Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

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

Open
kvrvgv wants to merge 3 commits into
pyrogram:masterfrom
kvrvgv:master
Open

add drop_author parameter in methods/.../forward_messages.py, types.Message.reactions edited#1235
kvrvgv wants to merge 3 commits into
pyrogram:masterfrom
kvrvgv:master

Conversation

@kvrvgv

@kvrvgv kvrvgv commented Mar 13, 2023

Copy link
Copy Markdown
Contributor

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

schedule_date: datetime = None,
protect_content: bool = None
protect_content: bool = None,
drop_author: bool = None

Copy link
Copy Markdown
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

Protects the contents of the sent message from forwarding and saving.

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

Copy link
Copy Markdown
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

schedule_date=utils.datetime_to_timestamp(schedule_date),
noforwards=protect_content
noforwards=protect_content,
drop_author=drop_author

Copy link
Copy Markdown
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
Copy Markdown
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

lcd1232 commented May 22, 2023

Copy link
Copy Markdown

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants