Log unsigned events

This commit is contained in:
Jon Staab 2026-09-02 08:53:19 -07:00
parent d87e516ffa
commit 15fcaf1279
2 changed files with 4 additions and 2 deletions

View file

@ -112,5 +112,5 @@
"throttle-debounce": "^5.0.2",
"tippy.js": "^6.3.7"
},
"packageManager": "pnpm@11.22.0"
"packageManager": "pnpm@11.25.0"
}

View file

@ -25,7 +25,7 @@ import {
makeAppPolicyAuth,
} from "@welshman/app"
import type {AppPolicy, IApp} from "@welshman/app"
import {app, appPolicies} from "@app/core"
import {app, logger, appPolicies} from "@app/core"
import {BLOCKED_RELAYS} from "@app/env"
import {userSettingsValues, getSetting, RelayAuthMode} from "@app/settings"
@ -106,6 +106,8 @@ const trustPolicy = (socket: Socket) => {
// the receive queue. If trust status is undefined, buffer it for later.
on(socket, SocketEvent.Receiving, (message: RelayMessage) => {
if (isRelayEvent(message) && !message[2]?.sig) {
logger.get().log("trustPolicy", {url: socket.url, message})
const isTrusted = getSetting("trusted_relays").includes(socket.url)
if (!isTrusted) {