diff --git a/dist/moderation/decision.js b/dist/moderation/decision.js index aaac177..d27c0be 100644 --- a/dist/moderation/decision.js +++ b/dist/moderation/decision.js @@ -67,6 +67,8 @@ class ModerationDecision { ui(context) { const ui = new ui_1.ModerationUI(); for (const cause of this.causes) { + if (cause?.label?.val === '!no-unauthenticated') continue; + if (cause.type === 'blocking' || cause.type === 'blocked-by' || cause.type === 'block-other') { diff --git a/dist/agent.js b/dist/agent.js index c486fb7..d77a845 100644 --- a/dist/agent.js +++ b/dist/agent.js @@ -99,6 +99,9 @@ class Agent extends xrpc_1.XrpcClient { if (this.proxy && !headers.has('atproto-proxy')) { headers.set('atproto-proxy', this.proxy); } + if (headers.get('atproto-proxy') === '') { + headers.delete('atproto-proxy'); + } // Merge the labelers header of this particular request with the app & // instance labelers. headers.set('atproto-accept-labelers', [ @@ -597,7 +600,7 @@ class Agent extends xrpc_1.XrpcClient { hideAllFeeds: false, }, }; - const res = await this.app.bsky.actor.getPreferences({}); + const res = await this.app.bsky.actor.getPreferences({}, {headers: {'atproto-proxy': ''}}); const labelPrefs = []; for (const pref of res.data.preferences) { if (predicate.isValidAdultContentPref(pref)) { @@ -1279,14 +1282,14 @@ class Agent extends xrpc_1.XrpcClient { async updatePreferences(cb) { try { await __classPrivateFieldGet(this, _Agent_prefsLock, "f").acquireAsync(); - const res = await this.app.bsky.actor.getPreferences({}); + const res = await this.app.bsky.actor.getPreferences({}, {headers: {'atproto-proxy': ''}}); const newPrefs = cb(res.data.preferences); if (newPrefs === false) { return res.data.preferences; } await this.app.bsky.actor.putPreferences({ preferences: newPrefs, - }); + }, {headers: {'atproto-proxy': ''}}); return newPrefs; } finally {