Correct notification text for threads

This commit is contained in:
discomrade 2021-10-17 21:57:12 -01:00
parent 807adaff90
commit 926b377032

View File

@ -222,10 +222,11 @@ $(document).ready(function(){
if (notify === "all") {
if ($(this).hasClass('thread')){
var body = $(this).children('.post').children('.body').html().replace(/<br\s*[\/]?>/gi, "\n");
var n = new Notification("New thread in "+title, {body: $('<div/>').html(body).text()});
} else {
var body = $(this).children('.body').html().replace(/<br\s*[\/]?>/gi, "\n");
var n = new Notification("New reply to "+title, {body: $('<div/>').html(body).text()});
}
var n = new Notification("New reply to "+title, {body: $('<div/>').html(body).text()});
}
if ($("div.post,div.thread").length > 1){
$(this).parent().insertBefore($($('div.post,div.thread').not('.post-hover').first()).parent());