/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once template class object_ptr; class ChannelData; class UserData; namespace Ui { class PopupMenu; class RpWidget; } // namespace Ui namespace Window { class SessionController; } // namespace Window namespace AntiSpamMenu { class AntiSpamValidator final { public: AntiSpamValidator( not_null controller, not_null channel); [[nodiscard]] object_ptr createButton() const; void resolveUser(Fn finish) const; [[nodiscard]] UserData *maybeAppendUser() const; [[nodiscard]] UserId userId() const; void addAction(not_null menu, FullMsgId fakeId) const; void addEventMsgId(FullMsgId fakeId, MsgId realId); private: const not_null _channel; const not_null _controller; base::flat_map _itemEventMsgIds; }; } // namespace AntiSpamMenu