summaryrefslogtreecommitdiff
path: root/client/command.go
diff options
context:
space:
mode:
authorcitrons <citrons@mondecitronne.com>2025-06-07 22:09:09 -0500
committercitrons <citrons@mondecitronne.com>2025-06-07 22:09:09 -0500
commit8a8f1f98859123e162090538cbdbe7f5c9d34ea4 (patch)
tree548d9ef52bfa1579c17ce1ee600ba3356fa1ffbe /client/command.go
parentf38d6eb807e2b921123dd5efd0b2d632a632e579 (diff)
direct messages
Diffstat (limited to 'client/command.go')
-rw-r--r--client/command.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/client/command.go b/client/command.go
index 2bc7868..6079070 100644
--- a/client/command.go
+++ b/client/command.go
@@ -117,6 +117,22 @@ func (a *application) doCommand(command string, args []string, text string) {
a.cmdWindow.who(u.Id)
}
})
+ case "msg":
+ a.lookup(text, "u", func(u *proto.Object, fail *proto.Fail) {
+ if fail != nil {
+ a.cmdWindow.fail(proto.Object(*fail))
+ } else {
+ a.joinDirect([]proto.Object {*u})
+ }
+ })
+ case "msgall":
+ a.lookupAll(args, "u", func(us []proto.Object, fail *proto.Fail) {
+ if fail != nil {
+ a.cmdWindow.fail(proto.Object(*fail))
+ } else {
+ a.joinDirect(us)
+ }
+ })
case "create":
if a.authenticated {
a.createChannel(text)