mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
message_edit: Remove NO_LONGER from editability_types.
Previously, NO_LONGER type was just used to display the text in the bottom-right of message edit form which we have removed now, so we can remove `NO_LONGER` type now.
This commit is contained in:
@@ -77,9 +77,9 @@ run_test("get_editability", ({override}) => {
|
|||||||
assert.equal(get_editability(message, 45), editability_types.TOPIC_ONLY);
|
assert.equal(get_editability(message, 45), editability_types.TOPIC_ONLY);
|
||||||
delete message.submessages;
|
delete message.submessages;
|
||||||
message.type = "private";
|
message.type = "private";
|
||||||
assert.equal(get_editability(message, 45), editability_types.NO_LONGER);
|
assert.equal(get_editability(message, 45), editability_types.NO);
|
||||||
// If we don't pass a second argument, treat it as 0
|
// If we don't pass a second argument, treat it as 0
|
||||||
assert.equal(get_editability(message), editability_types.NO_LONGER);
|
assert.equal(get_editability(message), editability_types.NO);
|
||||||
|
|
||||||
message = {
|
message = {
|
||||||
sent_by_me: false,
|
sent_by_me: false,
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ export let notify_new_thread_default = true;
|
|||||||
|
|
||||||
export const editability_types = {
|
export const editability_types = {
|
||||||
NO: 1,
|
NO: 1,
|
||||||
NO_LONGER: 2,
|
|
||||||
// Note: TOPIC_ONLY does not include stream messages with no topic sent
|
// Note: TOPIC_ONLY does not include stream messages with no topic sent
|
||||||
// by someone else. You can edit the topic of such a message by editing
|
// by someone else. You can edit the topic of such a message by editing
|
||||||
// the topic of the whole recipient_row it appears in, but you can't
|
// the topic of the whole recipient_row it appears in, but you can't
|
||||||
@@ -149,7 +148,7 @@ export function get_editability(message, edit_limit_seconds_buffer = 0) {
|
|||||||
if (message.type === "stream") {
|
if (message.type === "stream") {
|
||||||
return editability_types.TOPIC_ONLY;
|
return editability_types.TOPIC_ONLY;
|
||||||
}
|
}
|
||||||
return editability_types.NO_LONGER;
|
return editability_types.NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function get_deletability(message) {
|
export function get_deletability(message) {
|
||||||
|
|||||||
Reference in New Issue
Block a user