mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
refactor: Use message/topic in muting_ui.toggle_mute().
This commit is contained in:
@@ -196,11 +196,14 @@ exports.unmute = function (stream_id, topic) {
|
|||||||
exports.dismiss_mute_confirmation();
|
exports.dismiss_mute_confirmation();
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.toggle_mute = function (msg) {
|
exports.toggle_mute = function (message) {
|
||||||
if (muting.is_topic_muted(msg.stream_id, msg.subject)) {
|
var stream_id = message.stream_id;
|
||||||
exports.unmute(msg.stream_id, msg.subject);
|
var topic = util.get_message_topic(message);
|
||||||
} else if (msg.type === 'stream') {
|
|
||||||
exports.mute(msg.stream_id, msg.subject);
|
if (muting.is_topic_muted(stream_id, topic)) {
|
||||||
|
exports.unmute(stream_id, topic);
|
||||||
|
} else if (message.type === 'stream') {
|
||||||
|
exports.mute(stream_id, topic);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user