Add td_api::chatReportReasonUnrelatedLocation.

GitOrigin-RevId: 2bb5993d4478766a5758a18768c6afe18dbc2130
This commit is contained in:
levlam 2019-10-11 04:56:43 +03:00
parent 83d0d18a5e
commit f6f9997730
4 changed files with 11 additions and 0 deletions

View File

@ -2366,6 +2366,9 @@ chatReportReasonChildAbuse = ChatReportReason;
//@description The chat contains copyrighted content
chatReportReasonCopyright = ChatReportReason;
//@description The chat has unrelated location
chatReportReasonUnrelatedLocation = ChatReportReason;
//@description A custom reason provided by the user @text Report text
chatReportReasonCustom text:string = ChatReportReason;

Binary file not shown.

View File

@ -6644,6 +6644,12 @@ void MessagesManager::report_dialog(DialogId dialog_id, const tl_object_ptr<td_a
case td_api::chatReportReasonCopyright::ID:
report_reason = make_tl_object<telegram_api::inputReportReasonCopyright>();
break;
case td_api::chatReportReasonUnrelatedLocation::ID:
report_reason = make_tl_object<telegram_api::inputReportReasonGeoIrrelevant>();
if (dialog_id.get_type() == DialogType::Channel) {
hide_dialog_action_bar(d);
}
break;
case td_api::chatReportReasonCustom::ID: {
auto other_reason = static_cast<const td_api::chatReportReasonCustom *>(reason.get());
auto text = other_reason->text_;

View File

@ -3639,6 +3639,8 @@ class CliClient final : public Actor {
reason = td_api::make_object<td_api::chatReportReasonChildAbuse>();
} else if (reason_str == "copyright") {
reason = td_api::make_object<td_api::chatReportReasonCopyright>();
} else if (reason_str == "geo" || reason_str == "location") {
reason = td_api::make_object<td_api::chatReportReasonUnrelatedLocation>();
} else {
reason = td_api::make_object<td_api::chatReportReasonCustom>(reason_str);
}