feat: hide notifications from untrusted users

This commit is contained in:
codytseng 2025-06-01 23:00:01 +08:00
parent 587038d51a
commit c17d1b8ab5
18 changed files with 81 additions and 33 deletions

View file

@ -23,7 +23,7 @@ const wotSet = new Set<string>()
export function UserTrustProvider({ children }: { children: React.ReactNode }) {
const { pubkey: currentPubkey } = useNostr()
const [enabled, setEnabled] = useState(storage.getHideUntrustedReplies())
const [enabled, setEnabled] = useState(storage.getHideUntrustedEvents())
useEffect(() => {
if (!currentPubkey) return
@ -43,7 +43,7 @@ export function UserTrustProvider({ children }: { children: React.ReactNode }) {
const updateEnabled = (enabled: boolean) => {
setEnabled(enabled)
storage.setHideUntrustedReplies(enabled)
storage.setHideUntrustedEvents(enabled)
}
const isUserTrusted = (pubkey: string) => {