Add op-bot support to chat_member messages.#139
Merged
marcopaganini merged 1 commit intoOsProgramadores:masterfrom Oct 7, 2025
Merged
Add op-bot support to chat_member messages.#139marcopaganini merged 1 commit intoOsProgramadores:masterfrom
marcopaganini merged 1 commit intoOsProgramadores:masterfrom
Conversation
- Start using the forked version of telegram-bot-api in github.com/osprogramadores/telegram-bot-api. - Add support for `chat_member` API messages and uses them to identify new users. This shoudl eliminate the problem where `new_chat_members` is not sent to large groups. - Some code cleanup to remove the deps on the `update` object on low level API calls. - Updated go version to 1.24.
2c0cb33 to
373628f
Compare
magnussolidus
approved these changes
Oct 6, 2025
magnussolidus
approved these changes
Oct 6, 2025
| log.Printf("Processing new user request for user %q, uid=%d\n", formatName(newUser), newUser.ID) | ||
|
|
||
| // Ban bots. Move on to next user. | ||
| if newUser.IsBot { |
Contributor
There was a problem hiding this comment.
Como o isBot é opcional, ele pode quebrar aqui caso não venha nada ou vai falhar e não entrar no if? Sou fraco em Go.
Contributor
Author
There was a problem hiding this comment.
Em Go, a maioria dos tipos tem o default , 0, ou false (dependendo do tipo) se não for definido. É um pattern comum ao programar em go: assumir negativo se não estiver definido.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
github.com/osprogramadores/telegram-bot-api.
chat_memberAPI messages and uses them to identifynew users. This shoudl eliminate the problem where
new_chat_membersis not sent to large groups.
updateobject on lowlevel API calls.