mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
new proposed format for RESUMED messages
This commit is contained in:
parent
57684fc1e5
commit
74732c4aeb
@ -578,6 +578,9 @@ func (session *Session) playResume() {
|
||||
}
|
||||
|
||||
timestamp := session.resumeDetails.Timestamp
|
||||
if timestamp.IsZero() {
|
||||
timestamp = session.client.ctime
|
||||
}
|
||||
gap := lastDiscarded.Sub(timestamp)
|
||||
session.resumeDetails.HistoryIncomplete = gap > 0
|
||||
gapSeconds := int(gap.Seconds()) + 1 // round up to avoid confusion
|
||||
@ -595,10 +598,10 @@ func (session *Session) playResume() {
|
||||
}
|
||||
for _, fSession := range friend.Sessions() {
|
||||
if fSession.capabilities.Has(caps.Resume) {
|
||||
if timestamp.IsZero() {
|
||||
fSession.Send(nil, oldNickmask, "RESUMED", hostname)
|
||||
} else {
|
||||
if session.resumeDetails.HistoryIncomplete {
|
||||
fSession.Send(nil, oldNickmask, "RESUMED", hostname, timestampString)
|
||||
} else {
|
||||
fSession.Send(nil, oldNickmask, "RESUMED", hostname)
|
||||
}
|
||||
} else {
|
||||
if session.resumeDetails.HistoryIncomplete {
|
||||
|
Loading…
Reference in New Issue
Block a user