mirror of
https://github.com/zulip/zulip.git
synced 2025-10-30 19:43:47 +00:00
message: Remove failure message for disabled read receipts.
This removes the "Failed to load read receipts." prefix in the read receipt overlay in case of organizations that have disabled their read receipts. Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/Why.20the.20failure.20message.20on.20disabled.20read.20receipts.2E
This commit is contained in:
committed by
Tim Abbott
parent
2bd88254a1
commit
ed0f5bd6ed
@@ -12,6 +12,7 @@ import * as loading from "./loading.ts";
|
||||
import * as message_store from "./message_store.ts";
|
||||
import * as modals from "./modals.ts";
|
||||
import * as people from "./people.ts";
|
||||
import {realm} from "./state_data.ts";
|
||||
import * as ui_report from "./ui_report.ts";
|
||||
import * as util from "./util.ts";
|
||||
|
||||
@@ -36,6 +37,16 @@ export function fetch_read_receipts(message_id: number): void {
|
||||
$("#read_receipts_modal .modal__content").addClass("compact");
|
||||
return;
|
||||
}
|
||||
if (!realm.realm_enable_read_receipts) {
|
||||
ui_report.error(
|
||||
$t({
|
||||
defaultMessage: "Read receipts are disabled for this organization.",
|
||||
}),
|
||||
undefined,
|
||||
$("#read_receipts_modal #read_receipts_error"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!has_initial_data) {
|
||||
loading.make_indicator($("#read_receipts_modal .loading_indicator"));
|
||||
|
||||
Reference in New Issue
Block a user