Skip to content

Commit

Permalink
fix:get_list_block_sieve function not callable if sievefilters module…
Browse files Browse the repository at this point in the history
… is disabled
  • Loading branch information
christer77 committed Jan 28, 2025
1 parent eeecde1 commit c1d6a36
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
21 changes: 0 additions & 21 deletions modules/imap/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -1351,27 +1351,6 @@ var add_email_in_contact_trusted = function(list_email) {
}
};


function get_list_block_sieve() {
sessionStorage.removeItem('list_blocked');
var detail = Hm_Utils.parse_folder_path(hm_list_path());
var list_blocked_senders = [];
var page = hm_page_name();
if (page == 'message_list') {
Hm_Ajax.request(
[
{ name: 'hm_ajax_hook', value: 'ajax_list_block_sieve' },
{ name: 'imap_server_id', 'value': detail.server_id},
],
function (res) {
if (res.ajax_list_block_sieve) {
sessionStorage.setItem('list_blocked', res.ajax_list_block_sieve);
}
}
);
}
};

$('.screen-email-unlike').on("click", function() { imap_screen_email(); return false; });

$('.screen-email-like').on("click", function() {
Expand Down
20 changes: 20 additions & 0 deletions modules/sievefilters/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,26 @@ function sieveFiltersPageHandler() {
});
}

function get_list_block_sieve() {
sessionStorage.removeItem('list_blocked');
var detail = Hm_Utils.parse_folder_path(hm_list_path());
var list_blocked_senders = [];
var page = hm_page_name();
if (page == 'message_list') {
Hm_Ajax.request(
[
{ name: 'hm_ajax_hook', value: 'ajax_list_block_sieve' },
{ name: 'imap_server_id', 'value': detail.server_id},
],
function (res) {
if (res.ajax_list_block_sieve) {
sessionStorage.setItem('list_blocked', res.ajax_list_block_sieve);
}
}
);
}
};

$(function () {
$(document).on('change', '#block_action', function(e) {
if ($(this).val() == 'reject_with_message') {
Expand Down

0 comments on commit c1d6a36

Please sign in to comment.