2016-10-02 09:30:28 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop version of Telegram messaging app, see https://telegram.org
|
|
|
|
|
|
|
|
Telegram Desktop is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
It is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
In addition, as a special exception, the copyright holders give permission
|
|
|
|
to link the code of portions of this program with the OpenSSL library.
|
|
|
|
|
|
|
|
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
2017-01-11 18:31:31 +00:00
|
|
|
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
2016-10-02 09:30:28 +00:00
|
|
|
*/
|
2016-10-02 13:54:27 +00:00
|
|
|
#include "window/notifications_manager.h"
|
2016-10-02 09:30:28 +00:00
|
|
|
|
|
|
|
#include "platform/platform_notifications_manager.h"
|
2016-10-02 13:54:27 +00:00
|
|
|
#include "window/notifications_manager_default.h"
|
2017-05-03 13:01:15 +00:00
|
|
|
#include "media/media_audio_track.h"
|
|
|
|
#include "media/media_audio.h"
|
2017-04-13 08:27:10 +00:00
|
|
|
#include "lang/lang_keys.h"
|
2016-10-02 16:32:46 +00:00
|
|
|
#include "mainwindow.h"
|
2016-10-02 17:06:34 +00:00
|
|
|
#include "mainwidget.h"
|
2017-03-04 19:36:59 +00:00
|
|
|
#include "apiwrap.h"
|
|
|
|
#include "auth_session.h"
|
2016-10-02 09:30:28 +00:00
|
|
|
|
|
|
|
namespace Window {
|
|
|
|
namespace Notifications {
|
2017-12-04 17:46:03 +00:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
// not more than one sound in 500ms from one peer - grouping
|
|
|
|
constexpr auto kMinimalAlertDelay = TimeMs(500);
|
|
|
|
|
|
|
|
} // namespace
|
2016-10-02 09:30:28 +00:00
|
|
|
|
2017-03-04 19:36:59 +00:00
|
|
|
System::System(AuthSession *session) : _authSession(session) {
|
|
|
|
createManager();
|
|
|
|
|
|
|
|
_waitTimer.setTimeoutHandler([this] {
|
|
|
|
showNext();
|
|
|
|
});
|
|
|
|
|
|
|
|
subscribe(settingsChanged(), [this](ChangeType type) {
|
|
|
|
if (type == ChangeType::DesktopEnabled) {
|
|
|
|
App::wnd()->updateTrayMenu();
|
|
|
|
clearAll();
|
|
|
|
} else if (type == ChangeType::ViewParams) {
|
|
|
|
updateAll();
|
|
|
|
} else if (type == ChangeType::IncludeMuted) {
|
|
|
|
Notify::unreadCounterUpdated();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void System::createManager() {
|
|
|
|
_manager = Platform::Notifications::Create(this);
|
|
|
|
if (!_manager) {
|
|
|
|
_manager = std::make_unique<Default::Manager>(this);
|
|
|
|
}
|
2016-10-02 09:30:28 +00:00
|
|
|
}
|
|
|
|
|
2017-03-04 19:36:59 +00:00
|
|
|
void System::schedule(History *history, HistoryItem *item) {
|
2017-08-04 14:54:32 +00:00
|
|
|
if (App::quitting() || !history->currentNotification() || !AuthSession::Exists()) return;
|
2017-03-04 19:36:59 +00:00
|
|
|
|
2017-04-18 19:00:21 +00:00
|
|
|
auto notifyByFrom = (!history->peer->isUser() && item->mentionsMe()) ? item->from() : nullptr;
|
2017-03-04 19:36:59 +00:00
|
|
|
|
|
|
|
if (item->isSilent()) {
|
|
|
|
history->popNotification(item);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-12-04 17:46:03 +00:00
|
|
|
auto haveSetting = !history->peer->notifySettingsUnknown();
|
2017-03-04 19:36:59 +00:00
|
|
|
if (haveSetting) {
|
2017-12-04 17:46:03 +00:00
|
|
|
if (history->peer->isMuted()) {
|
2017-03-04 19:36:59 +00:00
|
|
|
if (notifyByFrom) {
|
2017-12-04 17:46:03 +00:00
|
|
|
haveSetting = !item->from()->notifySettingsUnknown();
|
2017-03-04 19:36:59 +00:00
|
|
|
if (haveSetting) {
|
2017-12-04 17:46:03 +00:00
|
|
|
if (notifyByFrom->isMuted()) {
|
2017-03-04 19:36:59 +00:00
|
|
|
history->popNotification(item);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} else {
|
2017-08-04 14:54:32 +00:00
|
|
|
Auth().api().requestNotifySetting(notifyByFrom);
|
2017-03-04 19:36:59 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
history->popNotification(item);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
2017-12-04 17:46:03 +00:00
|
|
|
if (notifyByFrom && notifyByFrom->notifySettingsUnknown()) {
|
2017-08-04 14:54:32 +00:00
|
|
|
Auth().api().requestNotifySetting(notifyByFrom);
|
2017-03-04 19:36:59 +00:00
|
|
|
}
|
2017-08-04 14:54:32 +00:00
|
|
|
Auth().api().requestNotifySetting(history->peer);
|
2017-03-04 19:36:59 +00:00
|
|
|
}
|
|
|
|
if (!item->notificationReady()) {
|
|
|
|
haveSetting = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
int delay = item->Has<HistoryMessageForwarded>() ? 500 : 100, t = unixtime();
|
|
|
|
auto ms = getms(true);
|
|
|
|
bool isOnline = App::main()->lastWasOnline(), otherNotOld = ((cOtherOnline() * 1000LL) + Global::OnlineCloudTimeout() > t * 1000LL);
|
|
|
|
bool otherLaterThanMe = (cOtherOnline() * 1000LL + (ms - App::main()->lastSetOnline()) > t * 1000LL);
|
|
|
|
if (!isOnline && otherNotOld && otherLaterThanMe) {
|
|
|
|
delay = Global::NotifyCloudDelay();
|
|
|
|
} else if (cOtherOnline() >= t) {
|
|
|
|
delay = Global::NotifyDefaultDelay();
|
|
|
|
}
|
|
|
|
|
|
|
|
auto when = ms + delay;
|
|
|
|
_whenAlerts[history].insert(when, notifyByFrom);
|
|
|
|
if (Global::DesktopNotify() && !Platform::Notifications::SkipToast()) {
|
|
|
|
auto &whenMap = _whenMaps[history];
|
|
|
|
if (whenMap.constFind(item->id) == whenMap.cend()) {
|
|
|
|
whenMap.insert(item->id, when);
|
|
|
|
}
|
|
|
|
|
|
|
|
auto &addTo = haveSetting ? _waiters : _settingWaiters;
|
|
|
|
auto it = addTo.constFind(history);
|
|
|
|
if (it == addTo.cend() || it->when > when) {
|
|
|
|
addTo.insert(history, Waiter(item->id, when, notifyByFrom));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (haveSetting) {
|
|
|
|
if (!_waitTimer.isActive() || _waitTimer.remainingTime() > delay) {
|
|
|
|
_waitTimer.start(delay);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void System::clearAll() {
|
|
|
|
_manager->clearAll();
|
|
|
|
|
|
|
|
for (auto i = _whenMaps.cbegin(), e = _whenMaps.cend(); i != e; ++i) {
|
|
|
|
i.key()->clearNotifications();
|
|
|
|
}
|
|
|
|
_whenMaps.clear();
|
|
|
|
_whenAlerts.clear();
|
|
|
|
_waiters.clear();
|
|
|
|
_settingWaiters.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void System::clearFromHistory(History *history) {
|
|
|
|
_manager->clearFromHistory(history);
|
|
|
|
|
|
|
|
history->clearNotifications();
|
|
|
|
_whenMaps.remove(history);
|
|
|
|
_whenAlerts.remove(history);
|
|
|
|
_waiters.remove(history);
|
|
|
|
_settingWaiters.remove(history);
|
|
|
|
|
|
|
|
_waitTimer.stop();
|
|
|
|
showNext();
|
|
|
|
}
|
|
|
|
|
|
|
|
void System::clearFromItem(HistoryItem *item) {
|
|
|
|
_manager->clearFromItem(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
void System::clearAllFast() {
|
|
|
|
_manager->clearAllFast();
|
|
|
|
|
|
|
|
_whenMaps.clear();
|
|
|
|
_whenAlerts.clear();
|
|
|
|
_waiters.clear();
|
|
|
|
_settingWaiters.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void System::checkDelayed() {
|
|
|
|
for (auto i = _settingWaiters.begin(); i != _settingWaiters.end();) {
|
2017-12-04 17:46:03 +00:00
|
|
|
const auto history = i.key();
|
|
|
|
const auto peer = history->peer;
|
|
|
|
auto loaded = false;
|
|
|
|
auto muted = false;
|
|
|
|
if (!peer->notifySettingsUnknown()) {
|
|
|
|
if (!peer->isMuted()) {
|
2017-03-04 19:36:59 +00:00
|
|
|
loaded = true;
|
2017-12-04 17:46:03 +00:00
|
|
|
} else if (const auto from = i.value().notifyByFrom) {
|
|
|
|
if (!from->notifySettingsUnknown()) {
|
|
|
|
if (!from->isMuted()) {
|
2017-03-04 19:36:59 +00:00
|
|
|
loaded = true;
|
|
|
|
} else {
|
|
|
|
loaded = muted = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
loaded = muted = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (loaded) {
|
2017-12-04 17:46:03 +00:00
|
|
|
const auto fullId = FullMsgId(
|
|
|
|
history->channelId(),
|
|
|
|
i.value().msg);
|
|
|
|
if (const auto item = App::histItemById(fullId)) {
|
2017-03-04 19:36:59 +00:00
|
|
|
if (!item->notificationReady()) {
|
|
|
|
loaded = false;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
muted = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (loaded) {
|
|
|
|
if (!muted) {
|
|
|
|
_waiters.insert(i.key(), i.value());
|
|
|
|
}
|
|
|
|
i = _settingWaiters.erase(i);
|
|
|
|
} else {
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_waitTimer.stop();
|
|
|
|
showNext();
|
|
|
|
}
|
|
|
|
|
|
|
|
void System::showNext() {
|
|
|
|
if (App::quitting()) return;
|
|
|
|
|
|
|
|
auto ms = getms(true), nextAlert = 0LL;
|
|
|
|
bool alert = false;
|
|
|
|
int32 now = unixtime();
|
|
|
|
for (auto i = _whenAlerts.begin(); i != _whenAlerts.end();) {
|
|
|
|
while (!i.value().isEmpty() && i.value().begin().key() <= ms) {
|
2017-12-04 17:46:03 +00:00
|
|
|
const auto peer = i.key()->peer;
|
|
|
|
const auto peerUnknown = peer->notifySettingsUnknown();
|
|
|
|
const auto peerAlert = peerUnknown ? false : !peer->isMuted();
|
|
|
|
const auto from = i.value().begin().value();
|
|
|
|
const auto fromUnknown = (!from || from->notifySettingsUnknown());
|
|
|
|
const auto fromAlert = fromUnknown ? false : !from->isMuted();
|
|
|
|
if (peerAlert || fromAlert) {
|
2017-03-04 19:36:59 +00:00
|
|
|
alert = true;
|
|
|
|
}
|
2017-12-04 17:46:03 +00:00
|
|
|
while (!i.value().isEmpty()
|
|
|
|
&& i.value().begin().key() <= ms + kMinimalAlertDelay) {
|
|
|
|
i.value().erase(i.value().begin());
|
|
|
|
}
|
2017-03-04 19:36:59 +00:00
|
|
|
}
|
|
|
|
if (i.value().isEmpty()) {
|
|
|
|
i = _whenAlerts.erase(i);
|
|
|
|
} else {
|
|
|
|
if (!nextAlert || nextAlert > i.value().begin().key()) {
|
|
|
|
nextAlert = i.value().begin().key();
|
|
|
|
}
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (alert) {
|
|
|
|
Platform::Notifications::FlashBounce();
|
2017-05-03 13:01:15 +00:00
|
|
|
if (Global::SoundNotify() && !Platform::Notifications::SkipAudio()) {
|
|
|
|
ensureSoundCreated();
|
|
|
|
_soundTrack->playOnce();
|
|
|
|
emit Media::Player::mixer()->suppressAll(_soundTrack->getLengthMs());
|
|
|
|
emit Media::Player::mixer()->faderOnTimer();
|
|
|
|
}
|
2017-03-04 19:36:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (_waiters.isEmpty() || !Global::DesktopNotify() || Platform::Notifications::SkipToast()) {
|
|
|
|
if (nextAlert) {
|
|
|
|
_waitTimer.start(nextAlert - ms);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
while (true) {
|
|
|
|
auto next = 0LL;
|
|
|
|
HistoryItem *notifyItem = nullptr;
|
|
|
|
History *notifyHistory = nullptr;
|
|
|
|
for (auto i = _waiters.begin(); i != _waiters.end();) {
|
|
|
|
History *history = i.key();
|
|
|
|
if (history->currentNotification() && history->currentNotification()->id != i.value().msg) {
|
|
|
|
auto j = _whenMaps.find(history);
|
|
|
|
if (j == _whenMaps.end()) {
|
|
|
|
history->clearNotifications();
|
|
|
|
i = _waiters.erase(i);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
do {
|
|
|
|
auto k = j.value().constFind(history->currentNotification()->id);
|
|
|
|
if (k != j.value().cend()) {
|
|
|
|
i.value().msg = k.key();
|
|
|
|
i.value().when = k.value();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
history->skipNotification();
|
|
|
|
} while (history->currentNotification());
|
|
|
|
}
|
|
|
|
if (!history->currentNotification()) {
|
|
|
|
_whenMaps.remove(history);
|
|
|
|
i = _waiters.erase(i);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
auto when = i.value().when;
|
|
|
|
if (!notifyItem || next > when) {
|
|
|
|
next = when;
|
|
|
|
notifyItem = history->currentNotification();
|
|
|
|
notifyHistory = history;
|
|
|
|
}
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
if (notifyItem) {
|
|
|
|
if (next > ms) {
|
|
|
|
if (nextAlert && nextAlert < next) {
|
|
|
|
next = nextAlert;
|
|
|
|
nextAlert = 0;
|
|
|
|
}
|
|
|
|
_waitTimer.start(next - ms);
|
|
|
|
break;
|
|
|
|
} else {
|
2017-04-30 12:44:17 +00:00
|
|
|
auto forwardedItem = notifyItem->Has<HistoryMessageForwarded>() ? notifyItem : nullptr; // forwarded notify grouping
|
|
|
|
auto forwardedCount = 1;
|
2017-03-04 19:36:59 +00:00
|
|
|
|
|
|
|
auto ms = getms(true);
|
2017-04-30 12:44:17 +00:00
|
|
|
auto history = notifyItem->history();
|
2017-03-04 19:36:59 +00:00
|
|
|
auto j = _whenMaps.find(history);
|
|
|
|
if (j == _whenMaps.cend()) {
|
|
|
|
history->clearNotifications();
|
|
|
|
} else {
|
2017-04-30 12:44:17 +00:00
|
|
|
auto nextNotify = (HistoryItem*)nullptr;
|
2017-03-04 19:36:59 +00:00
|
|
|
do {
|
|
|
|
history->skipNotification();
|
|
|
|
if (!history->hasNotification()) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2017-04-30 12:44:17 +00:00
|
|
|
j.value().remove((forwardedItem ? forwardedItem : notifyItem)->id);
|
2017-03-04 19:36:59 +00:00
|
|
|
do {
|
|
|
|
auto k = j.value().constFind(history->currentNotification()->id);
|
|
|
|
if (k != j.value().cend()) {
|
|
|
|
nextNotify = history->currentNotification();
|
|
|
|
_waiters.insert(notifyHistory, Waiter(k.key(), k.value(), 0));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
history->skipNotification();
|
|
|
|
} while (history->hasNotification());
|
|
|
|
if (nextNotify) {
|
2017-04-30 12:44:17 +00:00
|
|
|
if (forwardedItem) {
|
|
|
|
auto nextForwarded = nextNotify->Has<HistoryMessageForwarded>() ? nextNotify : nullptr;
|
|
|
|
if (nextForwarded && forwardedItem->author() == nextForwarded->author() && qAbs(int64(nextForwarded->date.toTime_t()) - int64(forwardedItem->date.toTime_t())) < 2) {
|
|
|
|
forwardedItem = nextForwarded;
|
|
|
|
++forwardedCount;
|
2017-03-04 19:36:59 +00:00
|
|
|
} else {
|
|
|
|
nextNotify = nullptr;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
nextNotify = nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} while (nextNotify);
|
|
|
|
}
|
|
|
|
|
2017-04-30 12:44:17 +00:00
|
|
|
_manager->showNotification(notifyItem, forwardedCount);
|
2017-03-04 19:36:59 +00:00
|
|
|
|
|
|
|
if (!history->hasNotification()) {
|
|
|
|
_waiters.remove(history);
|
|
|
|
_whenMaps.remove(history);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (nextAlert) {
|
|
|
|
_waitTimer.start(nextAlert - ms);
|
2016-10-02 09:30:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-03 13:01:15 +00:00
|
|
|
void System::ensureSoundCreated() {
|
|
|
|
if (_soundTrack) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
_soundTrack = Media::Audio::Current().createTrack();
|
2017-08-04 14:54:32 +00:00
|
|
|
_soundTrack->fillFromFile(Auth().data().getSoundPath(qsl("msg_incoming")));
|
2017-05-03 13:01:15 +00:00
|
|
|
}
|
|
|
|
|
2017-03-04 19:36:59 +00:00
|
|
|
void System::updateAll() {
|
|
|
|
_manager->updateAll();
|
2016-10-02 09:30:28 +00:00
|
|
|
}
|
|
|
|
|
2016-10-08 08:38:53 +00:00
|
|
|
Manager::DisplayOptions Manager::getNotificationOptions(HistoryItem *item) {
|
|
|
|
auto hideEverything = (App::passcoded() || Global::ScreenIsLocked());
|
|
|
|
|
|
|
|
DisplayOptions result;
|
|
|
|
result.hideNameAndPhoto = hideEverything || (Global::NotifyView() > dbinvShowName);
|
|
|
|
result.hideMessageText = hideEverything || (Global::NotifyView() > dbinvShowPreview);
|
|
|
|
result.hideReplyButton = result.hideMessageText || !item || !item->history()->peer->canWrite();
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2016-10-02 16:32:46 +00:00
|
|
|
void Manager::notificationActivated(PeerId peerId, MsgId msgId) {
|
|
|
|
onBeforeNotificationActivated(peerId, msgId);
|
|
|
|
if (auto window = App::wnd()) {
|
|
|
|
auto history = App::history(peerId);
|
|
|
|
window->showFromTray();
|
2017-01-01 17:49:44 +00:00
|
|
|
window->reActivateWindow();
|
2016-10-02 16:32:46 +00:00
|
|
|
if (App::passcoded()) {
|
|
|
|
window->setInnerFocus();
|
2017-03-04 19:36:59 +00:00
|
|
|
system()->clearAll();
|
2016-10-02 16:32:46 +00:00
|
|
|
} else {
|
|
|
|
auto tomsg = !history->peer->isUser() && (msgId > 0);
|
|
|
|
if (tomsg) {
|
|
|
|
auto item = App::histItemById(peerToChannel(peerId), msgId);
|
|
|
|
if (!item || !item->mentionsMe()) {
|
|
|
|
tomsg = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Ui::showPeerHistory(history, tomsg ? msgId : ShowAtUnreadMsgId);
|
2017-03-04 19:36:59 +00:00
|
|
|
system()->clearFromHistory(history);
|
2016-10-02 16:32:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
onAfterNotificationActivated(peerId, msgId);
|
|
|
|
}
|
|
|
|
|
2016-10-02 17:06:34 +00:00
|
|
|
void Manager::notificationReplied(PeerId peerId, MsgId msgId, const QString &reply) {
|
|
|
|
if (!peerId) return;
|
|
|
|
|
|
|
|
auto history = App::history(peerId);
|
|
|
|
|
|
|
|
MainWidget::MessageToSend message;
|
|
|
|
message.history = history;
|
|
|
|
message.textWithTags = { reply, TextWithTags::Tags() };
|
|
|
|
message.replyTo = (msgId > 0 && !history->peer->isUser()) ? msgId : 0;
|
|
|
|
message.silent = false;
|
|
|
|
message.clearDraft = false;
|
|
|
|
if (auto main = App::main()) {
|
|
|
|
main->sendMessage(message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-02 13:54:27 +00:00
|
|
|
void NativeManager::doShowNotification(HistoryItem *item, int forwardedCount) {
|
2016-10-08 08:38:53 +00:00
|
|
|
auto options = getNotificationOptions(item);
|
2016-10-02 09:30:28 +00:00
|
|
|
|
2016-10-08 08:38:53 +00:00
|
|
|
QString title = options.hideNameAndPhoto ? qsl("Telegram Desktop") : item->history()->peer->name;
|
|
|
|
QString subtitle = options.hideNameAndPhoto ? QString() : item->notificationHeader();
|
|
|
|
QString text = options.hideMessageText ? lang(lng_notification_preview) : (forwardedCount < 2 ? item->notificationText() : lng_forward_messages(lt_count, forwardedCount));
|
2016-10-02 09:30:28 +00:00
|
|
|
|
2016-10-08 08:38:53 +00:00
|
|
|
doShowNativeNotification(item->history()->peer, item->id, title, subtitle, text, options.hideNameAndPhoto, options.hideReplyButton);
|
2016-10-02 09:30:28 +00:00
|
|
|
}
|
|
|
|
|
2017-05-03 13:01:15 +00:00
|
|
|
System::~System() = default;
|
|
|
|
|
2016-10-02 09:30:28 +00:00
|
|
|
} // namespace Notifications
|
|
|
|
} // namespace Window
|