|
@@ -832,9 +832,11 @@ func (session *Session) playResume() {
|
832
|
832
|
if !timestamp.IsZero() && privmsgSeq != nil {
|
833
|
833
|
after := history.Selector{Time: timestamp}
|
834
|
834
|
items, complete, _ := privmsgSeq.Between(after, history.Selector{}, config.History.ZNCMax)
|
835
|
|
- rb := NewResponseBuffer(session)
|
836
|
|
- client.replayPrivmsgHistory(rb, items, "", complete)
|
837
|
|
- rb.Send(true)
|
|
835
|
+ if len(items) != 0 {
|
|
836
|
+ rb := NewResponseBuffer(session)
|
|
837
|
+ client.replayPrivmsgHistory(rb, items, "", complete)
|
|
838
|
+ rb.Send(true)
|
|
839
|
+ }
|
838
|
840
|
}
|
839
|
841
|
|
840
|
842
|
session.resumeDetails = nil
|
|
@@ -844,12 +846,10 @@ func (client *Client) replayPrivmsgHistory(rb *ResponseBuffer, items []history.I
|
844
|
846
|
var batchID string
|
845
|
847
|
details := client.Details()
|
846
|
848
|
nick := details.nick
|
847
|
|
- if 0 < len(items) {
|
848
|
|
- if target == "" {
|
849
|
|
- target = nick
|
850
|
|
- }
|
851
|
|
- batchID = rb.StartNestedHistoryBatch(target)
|
|
849
|
+ if target == "" {
|
|
850
|
+ target = nick
|
852
|
851
|
}
|
|
852
|
+ batchID = rb.StartNestedHistoryBatch(target)
|
853
|
853
|
|
854
|
854
|
allowTags := rb.session.capabilities.Has(caps.MessageTags)
|
855
|
855
|
for _, item := range items {
|