From ab62b1591fc2623bc65be7cda0c80833d2597db6 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 15 Jul 2017 15:24:32 +0300 Subject: [PATCH] Fix duplicated entries in calls log box. Notify about new call service messages only for unread messages. --- Telegram/SourceFiles/history/history.cpp | 5 +++++ Telegram/SourceFiles/history/history_media_types.cpp | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history.cpp b/Telegram/SourceFiles/history/history.cpp index d4dbabf81..9ee000659 100644 --- a/Telegram/SourceFiles/history/history.cpp +++ b/Telegram/SourceFiles/history/history.cpp @@ -35,6 +35,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org #include "observer_peer.h" #include "auth_session.h" #include "window/notifications_manager.h" +#include "calls/calls_instance.h" namespace { @@ -1008,6 +1009,10 @@ HistoryItem *History::createItem(const MTPMessage &msg, bool applyServiceAction, if (App::main()) emit App::main()->peerUpdated(result->history()->peer); } } break; + + case mtpc_messageActionPhoneCall: { + Calls::Current().newServiceMessage().notify(result->fullId()); + } break; } } } break; diff --git a/Telegram/SourceFiles/history/history_media_types.cpp b/Telegram/SourceFiles/history/history_media_types.cpp index 51e152402..c16361e7d 100644 --- a/Telegram/SourceFiles/history/history_media_types.cpp +++ b/Telegram/SourceFiles/history/history_media_types.cpp @@ -3075,8 +3075,6 @@ HistoryCall::HistoryCall(gsl::not_null parent, const MTPDmessageAc _duration = 0; } } - - Calls::Current().newServiceMessage().notify(_parent->fullId()); } HistoryCall::FinishReason HistoryCall::GetReason(const MTPDmessageActionPhoneCall &call) {