I’ve noticed some warning messages like this one in my logs recently:
Message with unknown data received: {'update_id': 818573149, 'channel_post': {'message_id': 223, 'date': 1582529481, 'chat': {'id': -XXXXXXX, 'type': 'channel', 'title': 'Допомога Дітям (HELPING CHILDREN)', 'username': 'dopomogaditam'}, 'forward_from_chat': {'id': -XXXXXX, 'type': 'channel', 'title': 'ТИ НЕ ОДИН', 'username': 'helpingua'}, 'forward_date': 1582529468, 'entities': [], 'caption_entities': [], 'photo': [{'file_id': 'AgACAgIAAx0CVtSgZAAD315Te8kvncBmrIvWlw6dFKc7fHrlAAIurDEbUJKhSrG_7cg7dcqYIwABUZEuAAMBAAMCAANtAAOxfQACGAQ', 'width': 224, 'height': 320, 'file_size': 30537}, {'file_id': 'AgACAgIAAx0CVtSgZAAD315Te8kvncBmrIvWlw6dFKc7fHrlAAIurDEbUJKhSrG_7cg7dcqYIwABUZEuAAMBAAMCAAN4AAOyfQACGAQ', 'width': 552, 'height': 790, 'file_size': 113005}], 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'forward_from_message_id': 43, 'media_group_id': 'XXXXXX'}}
Basically, it seems to be a lot of nonsense. I removed the chat ID but it is not in the list of allowed chat ID’s from my configuration.yaml, so it appears someone got the name of my bot and is sending spam messages. From what I can tell, the Telegram API doesn’t allow for any kind of blocking or blacklisting, so these types of messages can still get through but will be stopped by the integration. I guess I’m just surprised that they’d even reach a point where they’d hit the log, since the chat ID is not in the allowed list in my configuration.
Has anyone else seen this type of issue? Is there any other mitigation strategy I am not aware of? Like I said, it seems to be more of an annoyance than a security risk or anything like that, I just want to be sure I’m not missing anything.