Fixed online message when current space name unavailable.

master
Matthieu Lalonde 5 years ago
parent b5cd2909e4
commit c7111ae969

@ -161,7 +161,11 @@ func (b *Type) userConnected(u altvr.User) {
if err != nil { if err != nil {
return return
} }
s := fmt.Sprintf("%s**%s is now online in %s!**", b.getUserEmojiByAltVRUser(u), u.GetDisplayName(), u.CurrentSpace.Name) ws := u.CurrentSpace.Name
if ws != "" {
ws = fmt.Sprintf(" in %s", ws)
}
s := fmt.Sprintf("%s**%s is now online%s!**", b.getUserEmojiByAltVRUser(u), u.GetDisplayName(), ws)
if !b.isQuiet && !upHas(uu.Privacy, userPrivacyJoin) { if !b.isQuiet && !upHas(uu.Privacy, userPrivacyJoin) {
b.dg.Session.ChannelMessageSend(b.DGcID, s) b.dg.Session.ChannelMessageSend(b.DGcID, s)
} }

Loading…
Cancel
Save