From 8a8f1f98859123e162090538cbdbe7f5c9d34ea4 Mon Sep 17 00:00:00 2001 From: citrons Date: Sat, 7 Jun 2025 22:09:09 -0500 Subject: direct messages --- client/command.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'client/command.go') 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) -- cgit v1.2.3