data_channel_admins.h 611 B

12345678910111213141516171819202122232425262728
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. namespace Data {
  9. class ChannelAdminChanges {
  10. public:
  11. ChannelAdminChanges(not_null<ChannelData*> channel);
  12. void add(UserId userId, const QString &rank);
  13. void remove(UserId userId);
  14. ~ChannelAdminChanges();
  15. private:
  16. not_null<ChannelData*> _channel;
  17. base::flat_map<UserId, QString> &_admins;
  18. base::flat_set<UserId> _changes;
  19. };
  20. } // namespace Data