chore: remove MESSAGE_KINDS, use MESSAGE

This commit is contained in:
2026-04-11 00:27:37 +05:45
parent c397ee38bb
commit fd1b12b14a
5 changed files with 11 additions and 15 deletions
+3 -4
View File
@@ -17,13 +17,12 @@ import {
getRelaysFromList,
getTagValue,
matchFilters,
MESSAGE,
type Filter,
type TrustedEvent,
} from "@welshman/util"
import {
DM_KINDS,
CONTENT_KINDS,
MESSAGE_KINDS,
notificationSettings,
pushState,
shouldNotify,
@@ -45,7 +44,7 @@ export type PushPermissionResult = {
}
export const onNotification = call(() => {
const allFilters = [{kinds: [...MESSAGE_KINDS, ...DM_KINDS]}, makeCommentFilter(MESSAGE_KINDS)]
const allFilters = [{kinds: [MESSAGE, ...DM_KINDS]}, makeCommentFilter([MESSAGE])]
const filters = allFilters.map(assoc("since", now()))
const subscribers: Subscriber<TrustedEvent>[] = []
@@ -158,7 +157,7 @@ export const syncRelaySubscriptions = (
userSettingsValues,
]).subscribe(
throttle(3000, ([$userSpaceUrls, {spaces, mentions}, {alerts}]) => {
const baseFilters = [{kinds: MESSAGE_KINDS}, makeCommentFilter(CONTENT_KINDS)]
const baseFilters = [{kinds: [MESSAGE]}, makeCommentFilter([MESSAGE])]
for (const url of $userSpaceUrls) {
const {notify = true, exceptions = []} = alerts.find(spec({url})) || {}