aboutsummaryrefslogtreecommitdiff
path: root/hotline
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2023-01-21 08:54:12 -0800
committerJeff Halter <868228+jhalter@users.noreply.github.com>2023-01-21 08:54:12 -0800
commit2d92d26e8abe2c368796e9d38c9ad87d0ac53df5 (patch)
tree036415ea06475f6ab9643423fffa9f8c7f822718 /hotline
parentd53ea2838b4eefe01b90d6854eba4055f63f44e0 (diff)
Minor cleanup
Diffstat (limited to 'hotline')
-rw-r--r--hotline/news.go8
-rw-r--r--hotline/transaction_handlers.go13
2 files changed, 10 insertions, 11 deletions
diff --git a/hotline/news.go b/hotline/news.go
index 11e2a27..38db97a 100644
--- a/hotline/news.go
+++ b/hotline/news.go
@@ -7,6 +7,14 @@ import (
"sort"
)
+const defaultNewsDateFormat = "Jan02 15:04" // Jun23 20:49
+
+const defaultNewsTemplate = `From %s (%s):
+
+%s
+
+__________________________________________________________`
+
type ThreadedNews struct {
Categories map[string]NewsCategoryListData15 `yaml:"Categories"`
}
diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go
index d3238f4..86cc758 100644
--- a/hotline/transaction_handlers.go
+++ b/hotline/transaction_handlers.go
@@ -990,15 +990,6 @@ func HandleTranAgreed(cc *ClientConn, t *Transaction) (res []Transaction, err er
return res, err
}
-const defaultNewsDateFormat = "Jan02 15:04" // Jun23 20:49
-// "Mon, 02 Jan 2006 15:04:05 MST"
-
-const defaultNewsTemplate = `From %s (%s):
-
-%s
-
-__________________________________________________________`
-
// HandleTranOldPostNews updates the flat news
// Fields used in this request:
// 101 Data
@@ -1919,7 +1910,7 @@ func HandleLeaveChat(cc *ClientConn, t *Transaction) (res []Transaction, err err
// HandleSetChatSubject is sent from a v1.8+ Hotline client when the user sets a private chat subject
// Fields used in the request:
// * 114 Chat ID
-// * 115 Chat subject Chat subject string
+// * 115 Chat subject
// Reply is not expected.
func HandleSetChatSubject(cc *ClientConn, t *Transaction) (res []Transaction, err error) {
chatID := t.GetField(fieldChatID).Data
@@ -1942,7 +1933,7 @@ func HandleSetChatSubject(cc *ClientConn, t *Transaction) (res []Transaction, er
return res, err
}
-// HandleMakeAlias makes a filer alias using the specified path.
+// HandleMakeAlias makes a file alias using the specified path.
// Fields used in the request:
// 201 File name
// 202 File path