diff --git a/td/telegram/VideoNotesManager.cpp b/td/telegram/VideoNotesManager.cpp index d33d8a63e..7a03e6f7a 100644 --- a/td/telegram/VideoNotesManager.cpp +++ b/td/telegram/VideoNotesManager.cpp @@ -171,7 +171,8 @@ void VideoNotesManager::create_video_note(FileId file_id, string minithumbnail, void VideoNotesManager::register_video_note(FileId video_note_file_id, FullMessageId full_message_id, const char *source) { - if (full_message_id.get_message_id().is_scheduled() || !full_message_id.get_message_id().is_server()) { + if (full_message_id.get_message_id().is_scheduled() || !full_message_id.get_message_id().is_server() || + td_->auth_manager_->is_bot()) { return; } LOG(INFO) << "Register video note " << video_note_file_id << " from " << full_message_id << " from " << source; @@ -183,7 +184,8 @@ void VideoNotesManager::register_video_note(FileId video_note_file_id, FullMessa void VideoNotesManager::unregister_video_note(FileId video_note_file_id, FullMessageId full_message_id, const char *source) { - if (full_message_id.get_message_id().is_scheduled() || !full_message_id.get_message_id().is_server()) { + if (full_message_id.get_message_id().is_scheduled() || !full_message_id.get_message_id().is_server() || + td_->auth_manager_->is_bot()) { return; } LOG(INFO) << "Unregister video note " << video_note_file_id << " from " << full_message_id << " from " << source; diff --git a/td/telegram/VoiceNotesManager.cpp b/td/telegram/VoiceNotesManager.cpp index 219d2e256..332f45d3c 100644 --- a/td/telegram/VoiceNotesManager.cpp +++ b/td/telegram/VoiceNotesManager.cpp @@ -6,6 +6,7 @@ // #include "td/telegram/VoiceNotesManager.h" +#include "td/telegram/AuthManager.h" #include "td/telegram/Dimensions.h" #include "td/telegram/files/FileManager.h" #include "td/telegram/Global.h" @@ -134,7 +135,8 @@ void VoiceNotesManager::create_voice_note(FileId file_id, string mime_type, int3 void VoiceNotesManager::register_voice_note(FileId voice_note_file_id, FullMessageId full_message_id, const char *source) { - if (full_message_id.get_message_id().is_scheduled() || !full_message_id.get_message_id().is_server()) { + if (full_message_id.get_message_id().is_scheduled() || !full_message_id.get_message_id().is_server() || + td_->auth_manager_->is_bot()) { return; } LOG(INFO) << "Register voice note " << voice_note_file_id << " from " << full_message_id << " from " << source; @@ -146,7 +148,8 @@ void VoiceNotesManager::register_voice_note(FileId voice_note_file_id, FullMessa void VoiceNotesManager::unregister_voice_note(FileId voice_note_file_id, FullMessageId full_message_id, const char *source) { - if (full_message_id.get_message_id().is_scheduled() || !full_message_id.get_message_id().is_server()) { + if (full_message_id.get_message_id().is_scheduled() || !full_message_id.get_message_id().is_server() || + td_->auth_manager_->is_bot()) { return; } LOG(INFO) << "Unregister voice note " << voice_note_file_id << " from " << full_message_id << " from " << source;