summaryrefslogtreecommitdiff
path: root/server/user/command.go
diff options
context:
space:
mode:
authorcitrons <citrons@mondecitronne.com>2025-06-02 16:32:49 -0500
committercitrons <citrons@mondecitronne.com>2025-06-02 16:36:36 -0500
commitfdaf24fd0aff9e1089157fd65d81a5aa3fe550bd (patch)
tree4b44f73af9cd139b698bf85dc23d6380b4f7d28a /server/user/command.go
parent30243fd5c596704d5e30b8ea19a05af1dd287d2e (diff)
user statuses
Diffstat (limited to 'server/user/command.go')
-rw-r--r--server/user/command.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/user/command.go b/server/user/command.go
index b14845c..0c4f6d0 100644
--- a/server/user/command.go
+++ b/server/user/command.go
@@ -23,15 +23,23 @@ func (u *User) SendRequest(r session.Request) {
return
}
name := u.name
+ status := u.status
for k, v := range upd.Fields {
switch k {
case "":
name = v
+ case "status":
+ status = v
default:
r.ReplyInvalid()
return
}
}
+ if len(status) > 512 {
+ r.Reply(proto.Fail{"too-long", "", nil}.Cmd())
+ return
+ }
+ u.status = status
if name != u.name {
err := u.Rename(name)
if err != nil {