mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-04 11:00:46 +00:00
Replace t_assert() with Assert().
Also use this assertions for Expects(), Ensures() and Unexpected().
This commit is contained in:
@@ -445,8 +445,8 @@ void AddParticipantsBoxController::Start(not_null<ChatData*> chat) {
|
||||
auto users = std::vector<not_null<UserData*>>();
|
||||
for (auto peer : rows) {
|
||||
auto user = peer->asUser();
|
||||
t_assert(user != nullptr);
|
||||
t_assert(!user->isSelf());
|
||||
Assert(user != nullptr);
|
||||
Assert(!user->isSelf());
|
||||
users.push_back(peer->asUser());
|
||||
}
|
||||
App::main()->addParticipants(chat, users);
|
||||
@@ -470,8 +470,8 @@ void AddParticipantsBoxController::Start(
|
||||
auto users = std::vector<not_null<UserData*>>();
|
||||
for (auto peer : rows) {
|
||||
auto user = peer->asUser();
|
||||
t_assert(user != nullptr);
|
||||
t_assert(!user->isSelf());
|
||||
Assert(user != nullptr);
|
||||
Assert(!user->isSelf());
|
||||
users.push_back(peer->asUser());
|
||||
}
|
||||
App::main()->addParticipants(channel, users);
|
||||
@@ -673,8 +673,8 @@ void EditChatAdminsBoxController::Start(not_null<ChatData*> chat) {
|
||||
auto users = std::vector<not_null<UserData*>>();
|
||||
for (auto peer : rows) {
|
||||
auto user = peer->asUser();
|
||||
t_assert(user != nullptr);
|
||||
t_assert(!user->isSelf());
|
||||
Assert(user != nullptr);
|
||||
Assert(!user->isSelf());
|
||||
users.push_back(peer->asUser());
|
||||
}
|
||||
Auth().api().editChatAdmins(chat, !controller->allAreAdmins(), { users.cbegin(), users.cend() });
|
||||
|
||||
Reference in New Issue
Block a user