diff options
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 |
