Add start of post-hiding by labels

This commit is contained in:
Paul Frazee
2023-04-11 22:44:53 -07:00
parent 866a5da0f0
commit b730b7c81f
8 changed files with 240 additions and 69 deletions
+11
View File
@@ -0,0 +1,11 @@
import {ComAtprotoLabelDefs} from '@atproto/api'
import {LabelValGroup, LABEL_VAL_GROUPS} from './const'
export function getLabelValueGroup(labelVal: string): LabelValGroup {
for (const id in LABEL_VAL_GROUPS) {
if (LABEL_VAL_GROUPS[id].values.includes(labelVal)) {
return LABEL_VAL_GROUPS[id]
}
}
return LABEL_VAL_GROUPS.unknown
}