-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Expand file tree
/
Copy pathmenu_antispam_validator.h
More file actions
49 lines (36 loc) · 1.13 KB
/
Copy pathmenu_antispam_validator.h
File metadata and controls
49 lines (36 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
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 <typename Object>
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<Window::SessionController*> controller,
not_null<ChannelData*> channel);
[[nodiscard]] object_ptr<Ui::RpWidget> createButton() const;
void resolveUser(Fn<void()> finish) const;
[[nodiscard]] UserData *maybeAppendUser() const;
[[nodiscard]] UserId userId() const;
void addAction(not_null<Ui::PopupMenu*> menu, FullMsgId fakeId) const;
void addEventMsgId(FullMsgId fakeId, MsgId realId);
private:
const not_null<ChannelData*> _channel;
const not_null<Window::SessionController*> _controller;
base::flat_map<FullMsgId, MsgId> _itemEventMsgIds;
};
} // namespace AntiSpamMenu