From 25765713a21037f5f1efb50805a90595430544d9 Mon Sep 17 00:00:00 2001 From: Roscoe Rubin-Rottenberg Date: Fri, 21 Aug 2026 19:15:28 -0400 Subject: [PATCH] fix: keep Spark profile labels profile-scoped --- lib/src/core/moderation/moderation_engine.dart | 3 ++- .../core/moderation/moderation_engine_test.dart | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/src/core/moderation/moderation_engine.dart b/lib/src/core/moderation/moderation_engine.dart index 0c4031a0..5d52f3e5 100644 --- a/lib/src/core/moderation/moderation_engine.dart +++ b/lib/src/core/moderation/moderation_engine.dart @@ -113,7 +113,8 @@ final class ModerationEngine { } bool _isProfileRecordLabel(Label label) { - return label.uri.endsWith('/app.bsky.actor.profile/self'); + return label.uri.endsWith('/app.bsky.actor.profile/self') || + label.uri.endsWith('/so.sprk.actor.profile/self'); } bool _isAccountLabel(Label label) { diff --git a/test/src/core/moderation/moderation_engine_test.dart b/test/src/core/moderation/moderation_engine_test.dart index ad521b79..d722697d 100644 --- a/test/src/core/moderation/moderation_engine_test.dart +++ b/test/src/core/moderation/moderation_engine_test.dart @@ -411,6 +411,23 @@ void main() { ); }); + test('keeps Spark profile-record labels out of account content', () { + final decision = _engine().evaluateProfileLabels( + [ + _label( + val: 'doxxing', + uri: 'at://did:plc:subject/so.sprk.actor.profile/self', + ), + ], + subjectDid: 'did:plc:subject', + now: now, + ); + + expect(decision.causes.single.target, ModerationTarget.profile); + expect(decision.forContext(ModerationContext.profileView).blur, isTrue); + expect(decision.forContext(ModerationContext.contentList).blur, isFalse); + }); + test( 'merges account, profile, and content decisions without losing targets', () { -- 2.51.2