diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-12 15:19:02 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-12 15:19:02 -0500 |
| commit | ececa97d9ee6a435f81756bc25e25ed80285d20b (patch) | |
| tree | 2bd48173352962fb505d87541815fdabfab98c86 /server/user | |
| parent | 6edb15c2e8012e963c6f238c9177bdef06a9d651 (diff) | |
InfoFor
Diffstat (limited to 'server/user')
| -rw-r--r-- | server/user/command.go | 4 | ||||
| -rw-r--r-- | server/user/user.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server/user/command.go b/server/user/command.go index 0c4f6d0..6eef81b 100644 --- a/server/user/command.go +++ b/server/user/command.go @@ -51,11 +51,11 @@ func (u *User) SendRequest(r session.Request) { r.ReplyOk() case "i": - r.Reply(proto.NewCmd("i", "", u.GetInfo())) + r.Reply(proto.NewCmd("i", "", u.InfoFor(r.From.UserId))) case "s": r.From.Subscribe(&u.Stream) - r.Reply(proto.NewCmd("i", "", u.GetInfo())) + r.Reply(proto.NewCmd("i", "", u.InfoFor(r.From.UserId))) case "u": r.From.Unsubscribe(&u.Stream) diff --git a/server/user/user.go b/server/user/user.go index 4d1d936..fb1022f 100644 --- a/server/user/user.go +++ b/server/user/user.go @@ -99,7 +99,7 @@ func (u *User) Delete() { u.store.world.PutObject(u.id, gone) } -func (u *User) GetInfo() proto.Object { +func (u *User) InfoFor(uid string) proto.Object { i := map[string]string {"": u.name} if u.status != "" { i["status"] = u.status |
