2023-08-21 17:52:56 +02:00
|
|
|
//
|
2024-01-01 01:07:21 +01:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
|
2023-08-21 17:52:56 +02:00
|
|
|
//
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
//
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "td/telegram/NotificationGroupInfo.h"
|
2023-08-22 18:10:22 +02:00
|
|
|
#include "td/telegram/Version.h"
|
2023-08-21 17:52:56 +02:00
|
|
|
|
|
|
|
#include "td/utils/common.h"
|
|
|
|
#include "td/utils/tl_helpers.h"
|
|
|
|
|
|
|
|
namespace td {
|
|
|
|
|
|
|
|
template <class StorerT>
|
|
|
|
void NotificationGroupInfo::store(StorerT &storer) const {
|
|
|
|
using td::store;
|
2023-08-21 18:36:43 +02:00
|
|
|
store(group_id_, storer);
|
|
|
|
store(last_notification_date_, storer);
|
|
|
|
store(last_notification_id_, storer);
|
|
|
|
store(max_removed_notification_id_, storer);
|
2023-08-22 15:32:40 +02:00
|
|
|
store(max_removed_object_id_, storer);
|
2023-08-21 17:52:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
template <class ParserT>
|
|
|
|
void NotificationGroupInfo::parse(ParserT &parser) {
|
|
|
|
using td::parse;
|
2023-08-21 18:36:43 +02:00
|
|
|
parse(group_id_, parser);
|
|
|
|
parse(last_notification_date_, parser);
|
|
|
|
parse(last_notification_id_, parser);
|
|
|
|
parse(max_removed_notification_id_, parser);
|
2023-08-21 17:52:56 +02:00
|
|
|
if (parser.version() >= static_cast<int32>(Version::AddNotificationGroupInfoMaxRemovedMessageId)) {
|
2023-08-22 15:32:40 +02:00
|
|
|
parse(max_removed_object_id_, parser);
|
2023-08-21 17:52:56 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace td
|