mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Use id for determining source of chat message.
We used to check the nick, which is not necessarily unique.
This commit is contained in:
parent
b527c8757a
commit
c227b113f6
1 changed files with 1 additions and 2 deletions
|
@ -2310,7 +2310,6 @@ let lastMessage = {};
|
||||||
* @param {unknown} message
|
* @param {unknown} message
|
||||||
*/
|
*/
|
||||||
function addToChatbox(peerId, dest, nick, time, privileged, history, kind, message) {
|
function addToChatbox(peerId, dest, nick, time, privileged, history, kind, message) {
|
||||||
let userpass = getUserPass();
|
|
||||||
let row = document.createElement('div');
|
let row = document.createElement('div');
|
||||||
row.classList.add('message-row');
|
row.classList.add('message-row');
|
||||||
let container = document.createElement('div');
|
let container = document.createElement('div');
|
||||||
|
@ -2320,7 +2319,7 @@ function addToChatbox(peerId, dest, nick, time, privileged, history, kind, messa
|
||||||
footer.classList.add('message-footer');
|
footer.classList.add('message-footer');
|
||||||
if(!peerId)
|
if(!peerId)
|
||||||
container.classList.add('message-system');
|
container.classList.add('message-system');
|
||||||
if(userpass.username === nick)
|
if(peerId === serverConnection.id)
|
||||||
container.classList.add('message-sender');
|
container.classList.add('message-sender');
|
||||||
if(dest)
|
if(dest)
|
||||||
container.classList.add('message-private');
|
container.classList.add('message-private');
|
||||||
|
|
Loading…
Reference in a new issue