{
data: 'message',
render: function (data, type, row, meta) {
//console.log(row);
let prevRowData= [];
if (meta.row > 0) { // Ensure there's a previous row
prevRowData = table.row(meta.row - 1).data();
}else{
prevRowData['is_reply'] = 'f'
prevRowData['is_admin_comment'] = '0'
}
html= '
';
if (row['parent_row'] == 'show_replies') {
// html += ''
}
let replyLevel = Math.min(parseInt(row['is_reply'] ?? 0), 5); // clamp between 0–5
html += '
';
if (row['is_reply'] > 0) {
let righticon = (replyLevel >= 2 && replyLevel <= 5)
? 'fa-angles-right'
: 'fa-angle-right';
html += ''
} else if (row['reaction'] != ''){
html += ''
}
html += '
' //first column
html += '
' //second column
html+= '
'+ row['name']+': '+ data +'
';
if ((row['authorClient'] !== null) && replyLevel == 0) {
html += ((row['authorClient'].id !== null) ? '
' : '');
html += ((row['authorClient'].mentionColor !== null) ? ' ' : '');
html += ((row['authorClient'].id !== null) ? '