fix nick's in chat

This commit is contained in:
koplenov 2026-05-07 06:33:07 +03:00
parent 8847e3a273
commit 596f2a1210

View file

@ -550,7 +550,8 @@ private _handle_message(el: Element) {
const from_full = msg.getAttribute('from') || ''
const slash = from_full.indexOf('/')
const from = slash >= 0 ? from_full.slice(0, slash) : from_full
const nick = slash >= 0 ? from_full.slice(slash + 1) : undefined
// Only groupchat carries a meaningful nick after the slash; for 1:1 the resource is just a device id.
const nick = type === 'groupchat' && slash >= 0 ? from_full.slice(slash + 1) : undefined
this.on_mam_message?.({
id: result.getAttribute('id') || this._id(),
from,