~delthas/senpai-dev

Do not assume a default reason v1 APPROVED

Adolfo Santiago: 1
 Do not assume a default reason

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~delthas/senpai-dev/patches/46722/mbox | git am -3
Learn more about email & git

[PATCH v1] Do not assume a default reason Export this patch

Putting an user away works with a reason, but to remove the away status
the reason must be empty.
---
 commands.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands.go b/commands.go
index e24e3f9..8c48fce 100644
--- a/commands.go
+++ b/commands.go
@@ -732,7 +732,7 @@ func commandDoSearch(app *App, args []string) (err error) {
}

func commandDoAway(app *App, args []string) (err error) {
	reason := "Away"
	reason := ""
	if len(args) > 0 {
		reason = args[0]
	}

base-commit: 7fbbcece42167a91ecb87a661fcae37939970c57
-- 
2.42.1
Hi,

Thanks for your patch :)

 > Putting an user away works with a reason, but to remove the away status
 > the reason must be empty.

While IRC has its actual AWAY command used for both going away and back 
(by using no away message for going back); I believe this is not very 
intuitive to users, and that AWAY messages are not that useful.

Thus the decision to have commands AWAY (with an optional message) for 
going away and BACK for going back from away. I think this would make 
more sense for beginner-ish users to IRC.

I'll keep the current behavior for a while, see how users generally feel 
about this, and then reevaluate later.