Bug 37635 - tgsend не отправляет сообщения в чат ResultCode: 500
Summary: tgsend не отправляет сообщения в чат ResultCode: 500
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: tgsend (show other bugs)
Version: unstable
Hardware: all Linux
: P3 major
Assignee: Andrey Cherepanov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-17 09:33 MSK by Vera Blagoveschenskaya
Modified: 2019-12-23 13:50 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vera Blagoveschenskaya 2019-12-17 09:33:12 MSK
tgsend-1.3.2-alt1
Стенд: p9 alt workstation x86_64

1) Создать бота, получить его токен, добавить в чат.
2) Выполнить команду
$ tgsend -t '994424117:AAEsfJcbwJVWa8d_eSinsw4G4Zs43w-54ME' --chatId='-353326361' -m 'hello world'

Результат: в телеграм от бота ничего не отправляется
Вывод в терминал

Request: { "chat_id": "-353326361","parse_mode":"HTML", "text":"hello world" }
ResultCode: 500

Для примера, с заданием в p8 http://git.altlinux.org/tasks/241850/ аналогичная команда успешно работает.

Эта же команда в режиме дебага:
$ tgsend -t '994424117:AAEsfJcbwJVWa8d_eSinsw4G4Zs43w-54ME' --chatId='-353326361' -m 'hello world' -d

check config file: /home/test/.tgsend/tgsend.conf
check config file: /etc/tgsend.conf
check config file: /usr/local/etc/tgsend.conf
check config file: /opt/tgsend/etc/tgsend.conf
Config file not found. 
option:t
  value:994424117:AAEsfJcbwJVWa8d_eSinsw4G4Zs43w-54ME
option:i
  value:-353326361
option:m
  value:hello world
Request: { "chat_id": "-353326361","parse_mode":"HTML", "text":"hello world" }
ResultCode: 500
Comment 1 Vera Blagoveschenskaya 2019-12-17 09:49:47 MSK
Аналогично, не отправляются файлы. Пример вывода

$ tgsend -t '994424117:AAEsfJcbwJVWa8d_eSinsw4G4Zs43w-54ME' --chatId='-353326361' -f /home/test/111 -d

check config file: /home/test/.tgsend/tgsend.conf
check config file: /etc/tgsend.conf
check config file: /usr/local/etc/tgsend.conf
check config file: /opt/tgsend/etc/tgsend.conf
Config file not found. 
option:t
  value:994424117:AAEsfJcbwJVWa8d_eSinsw4G4Zs43w-54ME
option:i
  value:-353326361
option:f
  value:/home/test/111
File open: /home/test/111
MIME-Type autodetect: application/octet-stream
--END_OF_PART-TGSEND-byX09
Content-Disposition: form-data; name="document"; filename="111"
Content-Type: application/octet-stream

*** Binary here ***

--END_OF_PART-TGSEND-byX09
Content-Disposition: form-data; name="chat_id"

-353326361
--END_OF_PART-TGSEND-byX09--
ResultCode:500
ResultString:
Comment 2 Антон Мидюков 2019-12-23 13:50:34 MSK
Пофикшено в 1.3.3-alt1