mirror of
https://github.com/jeremyd/ergo.git
synced 2026-05-16 04:44:49 -07:00
fix #1676, take 2
Ensure the pagination window is full by making sure that every history item gets a replay line in CHATHISTORY output, even TAGMSG.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
package history
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -77,3 +78,16 @@ func MinMaxAsc(after, before, cutoff time.Time) (min, max time.Time, ascending b
|
||||
}
|
||||
return after, before, ascending
|
||||
}
|
||||
|
||||
// maps regular msgids from JOIN, etc. to a msgid suitable for attaching
|
||||
// to a HistServ message describing the JOIN. See #491 for some history.
|
||||
func HistservMungeMsgid(msgid string) string {
|
||||
return "_" + msgid
|
||||
}
|
||||
|
||||
// strips munging from a msgid. future schemes may not support a well-defined
|
||||
// mapping of munged msgids to true msgids, but munged msgids should always contain
|
||||
// a _, with metadata in front and data (possibly the true msgid) after.
|
||||
func NormalizeMsgid(msgid string) string {
|
||||
return strings.TrimPrefix(msgid, "_")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user