summaryrefslogtreecommitdiff
path: root/irc/states.go
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtzfr.eu>2020-08-22 14:49:19 +0200
committerHubert Hirtz <hubert@hirtzfr.eu>2020-08-22 14:49:19 +0200
commit7e1cdf898b8b42997a6fcfe0212c2b3493489eee (patch)
treeea6b740c738fb0e7a53bbc2dd387097b23778f55 /irc/states.go
parentDon't send @+typing=done in the home buffer (diff)
Fix same messages being fetched with CHATHISTORY
The issue was that Message.Time() converted the timestamp to Local time, and this local timestamp was being used with UTC timestamps. Thus senpai now converts the time only during display. Moreover, to avoid missing messages in history (and at the cost of duplicates), the condition in bufferList.AddLines() as been modified.
Diffstat (limited to '')
-rw-r--r--irc/states.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/irc/states.go b/irc/states.go
index b335b26..8837018 100644
--- a/irc/states.go
+++ b/irc/states.go
@@ -361,7 +361,7 @@ func (s *Session) requestHistory(act actionRequestHistory) (err error) {
}
t := act.Before
- err = s.send("CHATHISTORY BEFORE %s timestamp=%04d-%02d-%02dT%02d:%02d:%02d.%03dZ 100\r\n", act.Target, t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), t.Nanosecond()/1e6)
+ err = s.send("CHATHISTORY BEFORE %s timestamp=%04d-%02d-%02dT%02d:%02d:%02d.%03dZ 100\r\n", act.Target, t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second()+1, t.Nanosecond()/1e6)
return
}