Browse Source

fix decision whether DM was sent by local or remote peer to mark it accordingly

readme-update
Simon Grim 8 years ago
parent
commit
61872ab4eb
  1. 4
      js/twister_formatpost.js

4
js/twister_formatpost.js

@ -266,10 +266,10 @@ function setPostInfoSent(n, k, item) { @@ -266,10 +266,10 @@ function setPostInfoSent(n, k, item) {
// format dmdata (returned by getdirectmsgs) to display in conversation thread
function postToElemDM(dmData, localUser, remoteUser) {
var senderAlias = (dmData.from && dmData.from.length && dmData.from.charCodeAt(0))
? dmData.from : (dmData.fromMe ? localUser : remoteUser);
? dmData.from : (dmData.fromMe || dmData.from === localUser ? localUser : remoteUser);
var elem = $('#dm-chat-template').clone(true).appendTo(twister.html.detached)
.removeAttr('id')
.addClass(dmData.fromMe ? 'sent' : 'received')
.addClass(dmData.fromMe || dmData.from === localUser ? 'sent' : 'received')
;
var elemName = elem.find('.post-info-name')

Loading…
Cancel
Save