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

The Album event occurs not every time #4075

Open
NickTxD opened this issue Mar 30, 2023 · 2 comments
Open

The Album event occurs not every time #4075

NickTxD opened this issue Mar 30, 2023 · 2 comments

Comments

@NickTxD
Copy link

NickTxD commented Mar 30, 2023

The Album event occurs not every time. I think it has to do with the implementation of AlbumHack class.
Are you planning to update this part of the code?

@Lonami
Copy link
Member

Lonami commented Mar 31, 2023

Please use the issue template, it exists for a reason.

As can probably guess by the name, albums are a hack. Official clients probably don't need such a thing, because they can just render messages together if they appear together and share a grouped_id.

There's no realistic way to fix this event. In theory, messages from an album could arrive hours apart. Should the library wait that long? Maybe one second is a better compromise. But now the delay is longer, and sometimes it can still fail anyway. Maybe the library could wait until a message which is not part of the group arrives. But it is possible for Telegram to send the start of an album, and unrelated message, and then the rest, so that wouldn't work either.

So if you have suggestions, I'd love to hear them. As it stands, the best I could do right now is either:

  • Document that this event is provided as a best-effort.
  • Bump the delay to 1s or perhaps even 2s.
  • Make it so the same grouped_id can trigger different events.Album. At least there won't be missed messages, but it will seem like like there is more than one album.
  • A combination of the above.
  • Remove the event entirely as it's misleading.

@omegastripes
Copy link

The Album event occurs not every time. I think it has to do with the implementation of AlbumHack class. Are you planning to update this part of the code?

Try downgrade to v1.24.0 as temp workaround, it makes Album event stable in my case.

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

No branches or pull requests

3 participants