for getConnectionsSortedByLastSeen, ignore accepted on servers
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
Dan Ballard 2022-12-05 19:24:22 -08:00
parent f630dedab6
commit 6eef88fc2d
1 changed files with 2 additions and 3 deletions

View File

@ -1055,17 +1055,16 @@ func (cp *cwtchPeer) getConnectionsSortedByLastSeen(doPeers, doServers bool) []*
byRecent := []*LastSeenConversation{} byRecent := []*LastSeenConversation{}
for _, conversation := range conversations { for _, conversation := range conversations {
if conversation.Accepted && !conversation.IsGroup() { if !conversation.IsGroup() {
if conversation.IsServer() { if conversation.IsServer() {
if !doServers { if !doServers {
continue continue
} }
} else { } else {
if !doPeers { if !doPeers || !conversation.Accepted {
continue continue
} }
} }
byRecent = append(byRecent, &LastSeenConversation{conversation, cp.GetConversationLastSeenTime(conversation.ID)}) byRecent = append(byRecent, &LastSeenConversation{conversation, cp.GetConversationLastSeenTime(conversation.ID)})
} }
} }