Open nuetoban opened 3 years ago
Maybe helpful:
Telegram Update JSON when trying to "reply" to a forwarded message.
{
"update_id": 471632444,
"message": {
"message_id": 3299,
"date": 1613904069,
"chat": {
"id": -392720014,
"type": "group",
"title": "test",
"all_members_are_administrators": true
},
"reply_to_message": {
"message_id": 3297,
"date": 1613904018,
"chat": {
"id": -392720014,
"type": "group",
"title": "test",
"all_members_are_administrators": true
},
"forward_date": 1613904018,
"text": "пп",
"entities": [],
"caption_entities": [],
"photo": [],
"new_chat_members": [],
"new_chat_photo": [],
"delete_chat_photo": false,
"group_chat_created": false,
"supergroup_chat_created": false,
"channel_chat_created": false,
"forward_sender_name": "Daniil Okhlopkov",
"from": {
"id": 1018878145,
"first_name": "999",
"is_bot": true,
"username": "9999"
}
},
"text": "аппп",
"entities": [],
"caption_entities": [],
"photo": [],
"new_chat_members": [],
"new_chat_photo": [],
"delete_chat_photo": false,
"group_chat_created": false,
"supergroup_chat_created": false,
"channel_chat_created": false,
"from": {
"id": 49820636,
"first_name": "Daniil",
"is_bot": false,
"last_name": "Okhlopkov",
"username": "okhlopkov",
"language_code": "en"
}
}
}
У меня в таком виде работает
def forward_to_user(update, context):
user_id = update.channel_post.reply_to_message.forward_from.id
context.bot.copy_message(
message_id=update.channel_post.message_id,
chat_id=user_id,
from_chat_id=update.channel_post.chat_id
)
у меня не работает в обоих случаях :( если найду решение, отпишусь
p.s. ошибка возникает даже если акк открыт для пересылки
p.p.s.
кажется, вот здесь проблема
но я пока разбираюсь
"""
:class:telegram.User
: The user that sent this update, no matter what kind of update this
is. Will be :obj:None
for :attr:channel_post
and :attr:poll
.
"""
Ничего не изменилось. Перезавёл приложение в Heroku, удалив старое, но как все было, так и осталось - при запрете пересылки сообщений мне не приходят сообщения на мой другой аккаунт. Как только разрешаешь пересылку, то сообщения приходят.
@Nuke142 - ответил в пулл реквесте. Попробуйте задеплоить из другой ветки.
The bot won't forward the message to the user when privacy settings like: