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

User not in chat and enabled deny to reference will not be referenced by id. #45

Open
Eyre-S opened this issue Oct 6, 2023 · 1 comment
Labels
15%source#interface About the user interface. 97%level#problem Someting doesn't work perfectly

Comments

@Eyre-S
Copy link
Owner

Eyre-S commented Oct 6, 2023

While one user is not in the chat (maybe already exited, or send message from linked channel but not join linked group), and they set the Forwarded Message permission to false(Nobody or Contacts Only). Morny will fail to reference them by id.

This is probably because Telegram Bot API will parse Markdown/HTML link with <a href="tg://user?id=1000">User</a> format to a text_mention message entity, which is not allowed when user set Forwarded Message permission to deny.

By changing the Markdown/HTML link to raw message entity of link with the tg://user?id=1000 can fix this —— the link entity will always sent with no permission check while the text_mention entity will check permission and will be ereased when denied.

@Eyre-S Eyre-S added 97%level#problem Someting doesn't work perfectly 15%source#interface About the user interface. labels Oct 6, 2023
@Eyre-S
Copy link
Owner Author

Eyre-S commented Oct 6, 2023

But due to the permission is just not allowed to reference the user, doing this is actually bypass the permission check and may be a illegal hacking.

Will this issue should be 'fixed'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
15%source#interface About the user interface. 97%level#problem Someting doesn't work perfectly
Projects
Status: Todo
Development

No branches or pull requests

1 participant