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

HTTP redirector service for Telegram content #147

Closed
Tracked by #102
ForNeVeR opened this issue Sep 30, 2021 · 0 comments · Fixed by #155
Closed
Tracked by #102

HTTP redirector service for Telegram content #147

ForNeVeR opened this issue Sep 30, 2021 · 0 comments · Fixed by #155
Assignees

Comments

@ForNeVeR
Copy link
Member

ForNeVeR commented Sep 30, 2021

As the first minimally viable step of #102, I propose us to do the following:

  1. Add database support to Emulsion (should be optional: I host a plenty of Emulsion instances already, and not every one of them demands a separate database).

  2. We should store the correspondence between Telegram message/content ids and our internal ones in said database.

  3. Every content id gets a nanoid.

  4. Every content-rich message gets that nanoid included instead of the current message link (like https://codingteam.org.ru/tg/<nanoid> instead of https://t.me/<tgid>).

  5. Create a HTTP service which will serve requests to https://codingteam.org.ru/tg/<nanoid>, and just redirect them to the corresponding https://t.me/<tgid> instead.

    This will require us to store both Telegram message id and content id together. Collisions are possible if there are several messages with the same content id (not sure how, but technically possible). In such cases, just generate several entries (for each content id + message id pair).

    At a later point, we may migrate and renormalize the database if we decide that the message ids aren't required.

@ForNeVeR ForNeVeR self-assigned this Sep 30, 2021
@ForNeVeR ForNeVeR mentioned this issue Sep 30, 2021
6 tasks
ForNeVeR added a commit that referenced this issue Oct 11, 2021
ForNeVeR added a commit that referenced this issue Oct 31, 2021
ForNeVeR added a commit that referenced this issue Oct 31, 2021
ForNeVeR added a commit that referenced this issue Oct 31, 2021
ForNeVeR added a commit that referenced this issue Jul 2, 2022
ForNeVeR added a commit that referenced this issue Jul 2, 2022
This update has introduced a FileUniqueId support, that's required to
properly handle the photos of different sizes.
ForNeVeR added a commit that referenced this issue Jul 2, 2022
ForNeVeR added a commit that referenced this issue Jul 2, 2022
ForNeVeR added a commit that referenced this issue Jul 3, 2022
ForNeVeR added a commit that referenced this issue Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant