add authorId to chat and userlist, possibly privacy/security issue?
parent
83a820b720
commit
5639bde5ad
|
@ -111,7 +111,7 @@ var chat = (function()
|
|||
|
||||
var authorName = msg.userName == null ? _('pad.userlist.unnamed') : padutils.escapeHtml(msg.userName);
|
||||
|
||||
var html = "<p class='" + authorClass + "'><b>" + authorName + ":</b><span class='time " + authorClass + "'>" + timeStr + "</span> " + text + "</p>";
|
||||
var html = "<p data-authorId='" + msg.userId + "' class='" + authorClass + "'><b>" + authorName + ":</b><span class='time " + authorClass + "'>" + timeStr + "</span> " + text + "</p>";
|
||||
if(isHistoryAdd)
|
||||
$(html).insertAfter('#chatloadmessagesbutton');
|
||||
else
|
||||
|
|
|
@ -119,9 +119,9 @@ var paduserlist = (function()
|
|||
return ['<td style="height:', height, 'px" class="usertdswatch"><div class="swatch" style="background:' + data.color + '"> </div></td>', '<td style="height:', height, 'px" class="usertdname">', nameHtml, '</td>', '<td style="height:', height, 'px" class="activity">', padutils.escapeHtml(data.activity), '</td>'].join('');
|
||||
}
|
||||
|
||||
function getRowHtml(id, innerHtml)
|
||||
function getRowHtml(id, innerHtml, authorId)
|
||||
{
|
||||
return '<tr id="' + id + '">' + innerHtml + '</tr>';
|
||||
return '<tr data-authorId="'+authorId+'" id="' + id + '">' + innerHtml + '</tr>';
|
||||
}
|
||||
|
||||
function rowNode(row)
|
||||
|
@ -191,18 +191,20 @@ var paduserlist = (function()
|
|||
domId: domId,
|
||||
animationPower: animationPower
|
||||
};
|
||||
var authorId = data.id;
|
||||
|
||||
handleRowData(row);
|
||||
rowsPresent.splice(position, 0, row);
|
||||
var tr;
|
||||
if (animationPower == 0)
|
||||
{
|
||||
tr = $(getRowHtml(domId, getUserRowHtml(getAnimationHeight(0), data)));
|
||||
tr = $(getRowHtml(domId, getUserRowHtml(getAnimationHeight(0), data), authorId));
|
||||
row.animationStep = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
rowsFadingIn.push(row);
|
||||
tr = $(getRowHtml(domId, getEmptyRowHtml(getAnimationHeight(ANIMATION_START))));
|
||||
tr = $(getRowHtml(domId, getEmptyRowHtml(getAnimationHeight(ANIMATION_START)), authorId));
|
||||
}
|
||||
handleRowNode(tr, data);
|
||||
if (position == 0)
|
||||
|
|
Loading…
Reference in New Issue