]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction_handlers.go
Simplify news article timestamping
[rbdr/mobius] / hotline / transaction_handlers.go
index ade024c4a3803c397e293c1c8606fa270311ad34..2c5a930aee5c0ba78f1a053efe88cd0e43d9b9d7 100644 (file)
@@ -1140,7 +1140,7 @@ func HandlePostNewsArt(cc *ClientConn, t *Transaction) (res []Transaction, err e
        newArt := NewsArtData{
                Title:         string(t.GetField(fieldNewsArtTitle).Data),
                Poster:        string(cc.UserName),
-               Date:          NewsDate(),
+               Date:          toHotlineTime(time.Now()),
                PrevArt:       []byte{0, 0, 0, 0},
                NextArt:       []byte{0, 0, 0, 0},
                ParentArt:     append([]byte{0, 0}, t.GetField(fieldNewsArtID).Data...),
@@ -1399,9 +1399,9 @@ func HandleSetClientUserInfo(cc *ClientConn, t *Transaction) (res []Transaction,
        return res, err
 }
 
-// HandleKeepAlive response to keepalive transactions with an empty reply
-// HL 1.9.2 Client sends keepalive msg every 3 minutes
-// HL 1.2.3 Client doesn't send keepalives
+// HandleKeepAlive responds to keepalive transactions with an empty reply
+// HL 1.9.2 Client sends keepalive msg every 3 minutes
+// HL 1.2.3 Client doesn't send keepalives
 func HandleKeepAlive(cc *ClientConn, t *Transaction) (res []Transaction, err error) {
        res = append(res, cc.NewReply(t))