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

Can't read send messages in old groups with dispatcher.OnNewMessage #1495

Open
kegfru opened this issue Dec 25, 2024 · 0 comments
Open

Can't read send messages in old groups with dispatcher.OnNewMessage #1495

kegfru opened this issue Dec 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kegfru
Copy link

kegfru commented Dec 25, 2024

What version of gotd are you using?

$ go list -m github.com/gotd/td
github.com/gotd/td v0.116.0

Can this issue be reproduced with the latest version?

Yes

What did you do?

Using basic example bot-echo write to some old (2 month old for me) group (Supergroup)

What did you expect to see?

Pong

What did you see instead?

Nothing in reply.
One string in debug:

bot_v3-1  | 2024-12-25T00:12:38.699Z      DEBUG   conn.mtproto    mtproto/handle_message.go:19    Handle message  {"v": "v0.116.0", "conn_id": 0, "dc_id": 2, "type_id": "0x74ae4240", "type_name": "updates#74ae4240", "size_bytes": 308, "msg_id": 7452135730304218113}

What Go version and environment are you using?

$ go version
go version go1.23.4 linux/amd64
go env Output
$ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.4'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/root/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='0'
GOMOD='/app/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build126182640=/tmp/go-build -gno-record-gcc-switches'

dispatcher.OnNewMessage() doesn't work with old groups but works with chats. If I try to use dispatcher.OnNewChannelMessage() it works for both channels and groups

I have another bot replying to messages (github.com/go-telegram-bot-api/telegram-bot-api) and have already attached to some old group. I tried to use its token, the same - old bot is working, echo_bot is not.

Bot details:

APP_ID and APP_HASH was created yesterday

Group details - test one was created 24 Oct, another - earlier.
New groups I created today is okay

@kegfru kegfru added the bug Something isn't working label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant