Add nickname fallback for rooms that don't have XEP-0421

This commit is contained in:
2026-02-04 17:57:24 +00:00
parent 6626d35920
commit f807565cb2
3 changed files with 31 additions and 7 deletions

View File

@@ -67,6 +67,10 @@ func switchToTab(jid string, w *gtk.Window) {
var ocu OccupantID
u.Get(&mu)
u.Get(&ocu)
id := ocu.ID
if id == "" {
id = JidMustParse(u.From).Resource
}
nick_label := gtk.NewLabel(JidMustParse(u.From).Resource)
nick_label.SetEllipsize(pango.EllipsizeEnd)
@@ -176,7 +180,7 @@ func switchToTab(jid string, w *gtk.Window) {
mo, _ := mucmembers.Load(JidMustParse(u.From).Bare())
mm := mo.(mucUnit)
mmm := mm.Members
mmmm, ok := mmm.Load(ocu.ID)
mmmm, ok := mmm.Load(id)
if ok {
pres := mmmm.(stanza.Presence)