+11
-1
packages/appview/src/api/lexicons/getStatuses.ts
+11
-1
packages/appview/src/api/lexicons/getStatuses.ts
···
1
+
import { XyzStatusphereStatus } from '@statusphere/lexicon'
2
+
1
3
import { AppContext } from '#/context'
2
4
import { Server } from '#/lexicons'
3
5
import { statusToStatusView } from '#/lib/hydrate'
···
17
19
encoding: 'application/json',
18
20
body: {
19
21
statuses: await Promise.all(
20
-
statuses.map((status) => statusToStatusView(status, ctx)),
22
+
statuses
23
+
.filter(
24
+
(status) =>
25
+
XyzStatusphereStatus.validateRecord({
26
+
$type: 'xyz.statusphere.status',
27
+
...status,
28
+
}).success,
29
+
)
30
+
.map((status) => statusToStatusView(status, ctx)),
21
31
),
22
32
},
23
33
}