Reload full dialog info after receiving SEND_AS_PEER_INVALID.
This commit is contained in:
parent
baf4310807
commit
5845917498
|
@ -3854,9 +3854,12 @@ class ForwardMessagesActor final : public NetActorOnce {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// no on_get_dialog_error call, because two dialogs are involved
|
// no on_get_dialog_error call, because two dialogs are involved
|
||||||
if (status.code() == 400 && status.message() == "CHAT_FORWARDS_RESTRICTED") {
|
if (status.code() == 400 && status.message() == CSlice("CHAT_FORWARDS_RESTRICTED")) {
|
||||||
td_->contacts_manager_->reload_dialog_info(from_dialog_id_, Promise<Unit>());
|
td_->contacts_manager_->reload_dialog_info(from_dialog_id_, Promise<Unit>());
|
||||||
}
|
}
|
||||||
|
if (status.code() == 400 && status.message() == CSlice("SEND_AS_PEER_INVALID")) {
|
||||||
|
td_->messages_manager_->reload_dialog_info_full(to_dialog_id_);
|
||||||
|
}
|
||||||
for (auto &random_id : random_ids_) {
|
for (auto &random_id : random_ids_) {
|
||||||
td_->messages_manager_->on_send_message_fail(random_id, status.clone());
|
td_->messages_manager_->on_send_message_fail(random_id, status.clone());
|
||||||
}
|
}
|
||||||
|
@ -27747,6 +27750,10 @@ bool MessagesManager::on_get_dialog_error(DialogId dialog_id, const Status &stat
|
||||||
if (G()->is_expected_error(status)) {
|
if (G()->is_expected_error(status)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (status.message() == CSlice("SEND_AS_PEER_INVALID")) {
|
||||||
|
reload_dialog_info_full(dialog_id);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
switch (dialog_id.get_type()) {
|
switch (dialog_id.get_type()) {
|
||||||
case DialogType::User:
|
case DialogType::User:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user