Closed brenkem closed 3 years ago
This issue seems to be related to this: https://github.com/influxdata/telegraf/issues/1258
And the previous issue seems to solved by this: https://github.com/influxdata/telegraf/pull/1266
I implemented the recommended fix: see attached patch
I recompiled the code and tested it successfully. I will create a pull request.
Thank you @brenkem for looking into this issue and opening a PR.
Describe the bug Chat ID is producing error on ARM7L platform.
On x86 the function strconv.Atoi is working fine, but on a ARM platform with armv7l (Odroid XU4) the command pingme fails.
To Reproduce Steps to reproduce the behavior:
$ pingme telegram --token "124:abcd" --title "Message title" --msg "My message" --channel="-1234567890123"
Expected behavior
The expected behavior is that the chat id is used to ping a telegram channel.
Desktop (please complete the following information):
Additional context
The conversion of the string to an integer is working fine on a x86 desktop PC. It seems that the 32 bit ARM Platform can not handle such big numbers, while a 64 bit architecture can handle it.
Source: service/telegram/telegram.go
chn := strings.Split(telegramOpts.Channel, ",") for _, v := range chn { if len(v) <= 0 { return helpers.ErrChannel } k, errStr := strconv.Atoi(v) if errStr != nil { return errStr } telegramSvc.AddReceivers(int64(k)) }
[ Zeile 81/102 (79%)]