diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-02 16:32:49 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-02 16:36:36 -0500 |
| commit | fdaf24fd0aff9e1089157fd65d81a5aa3fe550bd (patch) | |
| tree | 4b44f73af9cd139b698bf85dc23d6380b4f7d28a /server/user/user.go | |
| parent | 30243fd5c596704d5e30b8ea19a05af1dd287d2e (diff) | |
user statuses
Diffstat (limited to 'server/user/user.go')
| -rw-r--r-- | server/user/user.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/server/user/user.go b/server/user/user.go index 0a9ae4e..fa5f37b 100644 --- a/server/user/user.go +++ b/server/user/user.go @@ -17,6 +17,8 @@ type User struct { store *UserStore name string id string + status string + description string Stream session.Stream Channels map[string]bool Anonymous bool @@ -98,9 +100,11 @@ func (u *User) Delete() { } func (u *User) GetInfo() proto.Object { - return proto.Object { - "u", u.id, map[string]string {"": u.name}, + i := map[string]string {"": u.name} + if u.status != "" { + i["status"] = u.status } + return proto.Object {"u", u.id, i} } func (t Tombstone) GetInfo() proto.Object { |
