Format code, remove use of Mellium JID parser, and add indicator for messages originating from WebXDC apps
This commit is contained in:
@@ -33,9 +33,9 @@ func generatePresenceWidget(p stanza.Packet) gtk.Widgetter {
|
||||
}
|
||||
}
|
||||
|
||||
return gtk.NewLabel(jid.MustParse(presence.From).Resourcepart() + " left the MUC")
|
||||
return gtk.NewLabel(JidMustParse(presence.From).Resource + " left the MUC")
|
||||
} else {
|
||||
return gtk.NewLabel(jid.MustParse(presence.From).Resourcepart() + " joined the MUC")
|
||||
return gtk.NewLabel(JidMustParse(presence.From).Resource + " joined the MUC")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
|
||||
}
|
||||
|
||||
authorBox := gtk.NewBox(gtk.OrientationHorizontal, 10)
|
||||
|
||||
contentBox := gtk.NewBox(gtk.OrientationHorizontal, 0)
|
||||
// im := newImageFromPath("debug.png")
|
||||
|
||||
@@ -180,6 +181,13 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
|
||||
}
|
||||
|
||||
authorBox.Append(al)
|
||||
|
||||
wxdc := XDCEl{}
|
||||
ok = m.Get(&wxdc)
|
||||
if ok {
|
||||
authorBox.Append(gtk.NewLabel("🎮"))
|
||||
}
|
||||
|
||||
mlabel := gtk.NewLabel(m.Body)
|
||||
mlabel.SetWrap(true)
|
||||
mlabel.SetSelectable(true)
|
||||
|
||||
Reference in New Issue
Block a user