core: only create feature items in used contacts (#1421)

* core: only create feature items in used contacts

* fix, test
This commit is contained in:
Evgeny Poberezkin
2022-11-25 15:37:36 +00:00
committed by GitHub
parent 87d306383c
commit 60fedbf5d2
3 changed files with 11 additions and 10 deletions

View File

@@ -119,6 +119,10 @@ contactConnId = aConnId . contactConn
contactConnIncognito :: Contact -> Bool
contactConnIncognito = connIncognito . contactConn
directContact :: Contact -> Bool
directContact Contact {contactUsed, activeConn = Connection {connLevel, viaGroupLink}} =
(connLevel == 0 && not viaGroupLink) || contactUsed
data ContactRef = ContactRef
{ contactId :: ContactId,
localDisplayName :: ContactName