core: do not create group history item (#3586)

* core: do not create group history item

* fix tests
This commit is contained in:
Evgeny Poberezkin
2023-12-23 19:56:01 +00:00
committed by GitHub
parent b8cb954882
commit 2834b192ce
3 changed files with 10 additions and 8 deletions
+6 -4
View File
@@ -184,17 +184,19 @@ groupFeatureAllowed' :: GroupFeatureI f => SGroupFeature f -> FullGroupPreferenc
groupFeatureAllowed' feature prefs =
getField @"enable" (getGroupPreference feature prefs) == FEOn
allGroupFeatures :: [AGroupFeature]
allGroupFeatures =
allGroupFeatureItems :: [AGroupFeature]
allGroupFeatureItems =
[ AGF SGFTimedMessages,
AGF SGFDirectMessages,
AGF SGFFullDelete,
AGF SGFReactions,
AGF SGFVoice,
AGF SGFFiles,
AGF SGFHistory
AGF SGFFiles
]
allGroupFeatures :: [AGroupFeature]
allGroupFeatures = allGroupFeatureItems <> [AGF SGFHistory]
groupPrefSel :: SGroupFeature f -> GroupPreferences -> Maybe (GroupFeaturePreference f)
groupPrefSel f ps = case f of
SGFTimedMessages -> ps.timedMessages