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

Fix excess api request for getMessageLinkInfo #432

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fliptheweb
Copy link

Problem:
On every search type app does an excess request to API getMessageLinkInfo and receives the error:

{
  @client_id: 1,
  
  @extra: { query_id: 1111 },
  
  @type: "error”,
  
  code: 400,
  
  message: "Invalid message link URL"
}

Solution:
Check that text is a telegram link.

Details:
We also could check that link is a message link (a subset of telegram link) which looks like https://t.me/<channel>/<message_id>, but I can't find any documentation for all available patterns, so didn't implement it to avoid a false negative.

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

Successfully merging this pull request may close these issues.

1 participant