@atproto/ozone 0.1.147 → 0.1.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/lexicon/index.d.ts +9 -14
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +9 -14
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +44 -84
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +38 -68
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/com/atproto/moderation/defs.d.ts +2 -2
- package/dist/lexicon/types/com/atproto/moderation/defs.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/moderation/defs.js +1 -1
- package/dist/lexicon/types/com/atproto/moderation/defs.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/report/defs.d.ts +17 -27
- package/dist/lexicon/types/tools/ozone/report/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/report/defs.js +17 -27
- package/dist/lexicon/types/tools/ozone/report/defs.js.map +1 -1
- package/dist/mod-service/profile.d.ts.map +1 -1
- package/dist/mod-service/profile.js +14 -26
- package/dist/mod-service/profile.js.map +1 -1
- package/dist/mod-service/views.d.ts.map +1 -1
- package/dist/mod-service/views.js +0 -1
- package/dist/mod-service/views.js.map +1 -1
- package/package.json +3 -3
- package/src/lexicon/index.ts +12 -25
- package/src/lexicon/lexicons.ts +38 -70
- package/src/lexicon/types/com/atproto/moderation/defs.ts +10 -15
- package/src/lexicon/types/tools/ozone/report/defs.ts +25 -40
- package/src/mod-service/profile.ts +22 -26
- package/src/mod-service/views.ts +2 -1
- package/tests/__snapshots__/blob-divert.test.ts.snap +197 -0
- package/tests/blob-divert.test.ts +3 -0
|
@@ -23,27 +23,24 @@ export type ReasonType =
|
|
|
23
23
|
| 'com.atproto.moderation.defs#reasonOther'
|
|
24
24
|
| 'com.atproto.moderation.defs#reasonAppeal'
|
|
25
25
|
| 'tools.ozone.report.defs#reasonAppeal'
|
|
26
|
-
| 'tools.ozone.report.defs#
|
|
26
|
+
| 'tools.ozone.report.defs#reasonOther'
|
|
27
|
+
| 'tools.ozone.report.defs#reasonViolenceAnimal'
|
|
27
28
|
| 'tools.ozone.report.defs#reasonViolenceThreats'
|
|
28
29
|
| 'tools.ozone.report.defs#reasonViolenceGraphicContent'
|
|
29
|
-
| 'tools.ozone.report.defs#reasonViolenceSelfHarm'
|
|
30
30
|
| 'tools.ozone.report.defs#reasonViolenceGlorification'
|
|
31
31
|
| 'tools.ozone.report.defs#reasonViolenceExtremistContent'
|
|
32
32
|
| 'tools.ozone.report.defs#reasonViolenceTrafficking'
|
|
33
33
|
| 'tools.ozone.report.defs#reasonViolenceOther'
|
|
34
34
|
| 'tools.ozone.report.defs#reasonSexualAbuseContent'
|
|
35
35
|
| 'tools.ozone.report.defs#reasonSexualNCII'
|
|
36
|
-
| 'tools.ozone.report.defs#reasonSexualSextortion'
|
|
37
36
|
| 'tools.ozone.report.defs#reasonSexualDeepfake'
|
|
38
37
|
| 'tools.ozone.report.defs#reasonSexualAnimal'
|
|
39
38
|
| 'tools.ozone.report.defs#reasonSexualUnlabeled'
|
|
40
39
|
| 'tools.ozone.report.defs#reasonSexualOther'
|
|
41
40
|
| 'tools.ozone.report.defs#reasonChildSafetyCSAM'
|
|
42
41
|
| 'tools.ozone.report.defs#reasonChildSafetyGroom'
|
|
43
|
-
| 'tools.ozone.report.defs#
|
|
44
|
-
| 'tools.ozone.report.defs#reasonChildSafetyEndangerment'
|
|
42
|
+
| 'tools.ozone.report.defs#reasonChildSafetyPrivacy'
|
|
45
43
|
| 'tools.ozone.report.defs#reasonChildSafetyHarassment'
|
|
46
|
-
| 'tools.ozone.report.defs#reasonChildSafetyPromotion'
|
|
47
44
|
| 'tools.ozone.report.defs#reasonChildSafetyOther'
|
|
48
45
|
| 'tools.ozone.report.defs#reasonHarassmentTroll'
|
|
49
46
|
| 'tools.ozone.report.defs#reasonHarassmentTargeted'
|
|
@@ -54,19 +51,17 @@ export type ReasonType =
|
|
|
54
51
|
| 'tools.ozone.report.defs#reasonMisleadingImpersonation'
|
|
55
52
|
| 'tools.ozone.report.defs#reasonMisleadingSpam'
|
|
56
53
|
| 'tools.ozone.report.defs#reasonMisleadingScam'
|
|
57
|
-
| 'tools.ozone.report.defs#
|
|
58
|
-
| 'tools.ozone.report.defs#reasonMisleadingMisinformation'
|
|
54
|
+
| 'tools.ozone.report.defs#reasonMisleadingElections'
|
|
59
55
|
| 'tools.ozone.report.defs#reasonMisleadingOther'
|
|
60
56
|
| 'tools.ozone.report.defs#reasonRuleSiteSecurity'
|
|
61
|
-
| 'tools.ozone.report.defs#reasonRuleStolenContent'
|
|
62
57
|
| 'tools.ozone.report.defs#reasonRuleProhibitedSales'
|
|
63
58
|
| 'tools.ozone.report.defs#reasonRuleBanEvasion'
|
|
64
59
|
| 'tools.ozone.report.defs#reasonRuleOther'
|
|
65
|
-
| 'tools.ozone.report.defs#
|
|
66
|
-
| 'tools.ozone.report.defs#
|
|
67
|
-
| 'tools.ozone.report.defs#
|
|
68
|
-
| 'tools.ozone.report.defs#
|
|
69
|
-
| 'tools.ozone.report.defs#
|
|
60
|
+
| 'tools.ozone.report.defs#reasonSelfHarmContent'
|
|
61
|
+
| 'tools.ozone.report.defs#reasonSelfHarmED'
|
|
62
|
+
| 'tools.ozone.report.defs#reasonSelfHarmStunts'
|
|
63
|
+
| 'tools.ozone.report.defs#reasonSelfHarmSubstances'
|
|
64
|
+
| 'tools.ozone.report.defs#reasonSelfHarmOther'
|
|
70
65
|
| (string & {})
|
|
71
66
|
|
|
72
67
|
/** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. */
|
|
@@ -79,7 +74,7 @@ export const REASONMISLEADING = `${id}#reasonMisleading`
|
|
|
79
74
|
export const REASONSEXUAL = `${id}#reasonSexual`
|
|
80
75
|
/** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. */
|
|
81
76
|
export const REASONRUDE = `${id}#reasonRude`
|
|
82
|
-
/** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#
|
|
77
|
+
/** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`. */
|
|
83
78
|
export const REASONOTHER = `${id}#reasonOther`
|
|
84
79
|
/** Appeal a previously taken moderation action */
|
|
85
80
|
export const REASONAPPEAL = `${id}#reasonAppeal`
|
|
@@ -16,27 +16,24 @@ const id = 'tools.ozone.report.defs'
|
|
|
16
16
|
|
|
17
17
|
export type ReasonType =
|
|
18
18
|
| 'tools.ozone.report.defs#reasonAppeal'
|
|
19
|
-
| 'tools.ozone.report.defs#
|
|
19
|
+
| 'tools.ozone.report.defs#reasonOther'
|
|
20
|
+
| 'tools.ozone.report.defs#reasonViolenceAnimal'
|
|
20
21
|
| 'tools.ozone.report.defs#reasonViolenceThreats'
|
|
21
22
|
| 'tools.ozone.report.defs#reasonViolenceGraphicContent'
|
|
22
|
-
| 'tools.ozone.report.defs#reasonViolenceSelfHarm'
|
|
23
23
|
| 'tools.ozone.report.defs#reasonViolenceGlorification'
|
|
24
24
|
| 'tools.ozone.report.defs#reasonViolenceExtremistContent'
|
|
25
25
|
| 'tools.ozone.report.defs#reasonViolenceTrafficking'
|
|
26
26
|
| 'tools.ozone.report.defs#reasonViolenceOther'
|
|
27
27
|
| 'tools.ozone.report.defs#reasonSexualAbuseContent'
|
|
28
28
|
| 'tools.ozone.report.defs#reasonSexualNCII'
|
|
29
|
-
| 'tools.ozone.report.defs#reasonSexualSextortion'
|
|
30
29
|
| 'tools.ozone.report.defs#reasonSexualDeepfake'
|
|
31
30
|
| 'tools.ozone.report.defs#reasonSexualAnimal'
|
|
32
31
|
| 'tools.ozone.report.defs#reasonSexualUnlabeled'
|
|
33
32
|
| 'tools.ozone.report.defs#reasonSexualOther'
|
|
34
33
|
| 'tools.ozone.report.defs#reasonChildSafetyCSAM'
|
|
35
34
|
| 'tools.ozone.report.defs#reasonChildSafetyGroom'
|
|
36
|
-
| 'tools.ozone.report.defs#
|
|
37
|
-
| 'tools.ozone.report.defs#reasonChildSafetyEndangerment'
|
|
35
|
+
| 'tools.ozone.report.defs#reasonChildSafetyPrivacy'
|
|
38
36
|
| 'tools.ozone.report.defs#reasonChildSafetyHarassment'
|
|
39
|
-
| 'tools.ozone.report.defs#reasonChildSafetyPromotion'
|
|
40
37
|
| 'tools.ozone.report.defs#reasonChildSafetyOther'
|
|
41
38
|
| 'tools.ozone.report.defs#reasonHarassmentTroll'
|
|
42
39
|
| 'tools.ozone.report.defs#reasonHarassmentTargeted'
|
|
@@ -47,31 +44,29 @@ export type ReasonType =
|
|
|
47
44
|
| 'tools.ozone.report.defs#reasonMisleadingImpersonation'
|
|
48
45
|
| 'tools.ozone.report.defs#reasonMisleadingSpam'
|
|
49
46
|
| 'tools.ozone.report.defs#reasonMisleadingScam'
|
|
50
|
-
| 'tools.ozone.report.defs#
|
|
51
|
-
| 'tools.ozone.report.defs#reasonMisleadingMisinformation'
|
|
47
|
+
| 'tools.ozone.report.defs#reasonMisleadingElections'
|
|
52
48
|
| 'tools.ozone.report.defs#reasonMisleadingOther'
|
|
53
49
|
| 'tools.ozone.report.defs#reasonRuleSiteSecurity'
|
|
54
|
-
| 'tools.ozone.report.defs#reasonRuleStolenContent'
|
|
55
50
|
| 'tools.ozone.report.defs#reasonRuleProhibitedSales'
|
|
56
51
|
| 'tools.ozone.report.defs#reasonRuleBanEvasion'
|
|
57
52
|
| 'tools.ozone.report.defs#reasonRuleOther'
|
|
58
|
-
| 'tools.ozone.report.defs#
|
|
59
|
-
| 'tools.ozone.report.defs#
|
|
60
|
-
| 'tools.ozone.report.defs#
|
|
61
|
-
| 'tools.ozone.report.defs#
|
|
62
|
-
| 'tools.ozone.report.defs#
|
|
53
|
+
| 'tools.ozone.report.defs#reasonSelfHarmContent'
|
|
54
|
+
| 'tools.ozone.report.defs#reasonSelfHarmED'
|
|
55
|
+
| 'tools.ozone.report.defs#reasonSelfHarmStunts'
|
|
56
|
+
| 'tools.ozone.report.defs#reasonSelfHarmSubstances'
|
|
57
|
+
| 'tools.ozone.report.defs#reasonSelfHarmOther'
|
|
63
58
|
| (string & {})
|
|
64
59
|
|
|
65
60
|
/** Appeal a previously taken moderation action */
|
|
66
61
|
export const REASONAPPEAL = `${id}#reasonAppeal`
|
|
62
|
+
/** An issue not included in these options */
|
|
63
|
+
export const REASONOTHER = `${id}#reasonOther`
|
|
67
64
|
/** Animal welfare violations */
|
|
68
|
-
export const
|
|
65
|
+
export const REASONVIOLENCEANIMAL = `${id}#reasonViolenceAnimal`
|
|
69
66
|
/** Threats or incitement */
|
|
70
67
|
export const REASONVIOLENCETHREATS = `${id}#reasonViolenceThreats`
|
|
71
68
|
/** Graphic violent content */
|
|
72
69
|
export const REASONVIOLENCEGRAPHICCONTENT = `${id}#reasonViolenceGraphicContent`
|
|
73
|
-
/** Self harm */
|
|
74
|
-
export const REASONVIOLENCESELFHARM = `${id}#reasonViolenceSelfHarm`
|
|
75
70
|
/** Glorification of violence */
|
|
76
71
|
export const REASONVIOLENCEGLORIFICATION = `${id}#reasonViolenceGlorification`
|
|
77
72
|
/** Extremist content. These reports will be sent only be sent to the application's Moderation Authority. */
|
|
@@ -84,8 +79,6 @@ export const REASONVIOLENCEOTHER = `${id}#reasonViolenceOther`
|
|
|
84
79
|
export const REASONSEXUALABUSECONTENT = `${id}#reasonSexualAbuseContent`
|
|
85
80
|
/** Non-consensual intimate imagery */
|
|
86
81
|
export const REASONSEXUALNCII = `${id}#reasonSexualNCII`
|
|
87
|
-
/** Sextortion */
|
|
88
|
-
export const REASONSEXUALSEXTORTION = `${id}#reasonSexualSextortion`
|
|
89
82
|
/** Deepfake adult content */
|
|
90
83
|
export const REASONSEXUALDEEPFAKE = `${id}#reasonSexualDeepfake`
|
|
91
84
|
/** Animal sexual abuse */
|
|
@@ -99,13 +92,9 @@ export const REASONCHILDSAFETYCSAM = `${id}#reasonChildSafetyCSAM`
|
|
|
99
92
|
/** Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority. */
|
|
100
93
|
export const REASONCHILDSAFETYGROOM = `${id}#reasonChildSafetyGroom`
|
|
101
94
|
/** Privacy violation involving a minor */
|
|
102
|
-
export const
|
|
103
|
-
/** Child endangerment. These reports will be sent only be sent to the application's Moderation Authority. */
|
|
104
|
-
export const REASONCHILDSAFETYENDANGERMENT = `${id}#reasonChildSafetyEndangerment`
|
|
95
|
+
export const REASONCHILDSAFETYPRIVACY = `${id}#reasonChildSafetyPrivacy`
|
|
105
96
|
/** Harassment or bullying of minors */
|
|
106
97
|
export const REASONCHILDSAFETYHARASSMENT = `${id}#reasonChildSafetyHarassment`
|
|
107
|
-
/** Promotion of child exploitation. These reports will be sent only be sent to the application's Moderation Authority. */
|
|
108
|
-
export const REASONCHILDSAFETYPROMOTION = `${id}#reasonChildSafetyPromotion`
|
|
109
98
|
/** Other child safety. These reports will be sent only be sent to the application's Moderation Authority. */
|
|
110
99
|
export const REASONCHILDSAFETYOTHER = `${id}#reasonChildSafetyOther`
|
|
111
100
|
/** Trolling */
|
|
@@ -126,29 +115,25 @@ export const REASONMISLEADINGIMPERSONATION = `${id}#reasonMisleadingImpersonatio
|
|
|
126
115
|
export const REASONMISLEADINGSPAM = `${id}#reasonMisleadingSpam`
|
|
127
116
|
/** Scam */
|
|
128
117
|
export const REASONMISLEADINGSCAM = `${id}#reasonMisleadingScam`
|
|
129
|
-
/**
|
|
130
|
-
export const
|
|
131
|
-
/** Harmful false claims */
|
|
132
|
-
export const REASONMISLEADINGMISINFORMATION = `${id}#reasonMisleadingMisinformation`
|
|
118
|
+
/** False information about elections */
|
|
119
|
+
export const REASONMISLEADINGELECTIONS = `${id}#reasonMisleadingElections`
|
|
133
120
|
/** Other misleading content */
|
|
134
121
|
export const REASONMISLEADINGOTHER = `${id}#reasonMisleadingOther`
|
|
135
122
|
/** Hacking or system attacks */
|
|
136
123
|
export const REASONRULESITESECURITY = `${id}#reasonRuleSiteSecurity`
|
|
137
|
-
/** Stolen content */
|
|
138
|
-
export const REASONRULESTOLENCONTENT = `${id}#reasonRuleStolenContent`
|
|
139
124
|
/** Promoting or selling prohibited items or services */
|
|
140
125
|
export const REASONRULEPROHIBITEDSALES = `${id}#reasonRuleProhibitedSales`
|
|
141
126
|
/** Banned user returning */
|
|
142
127
|
export const REASONRULEBANEVASION = `${id}#reasonRuleBanEvasion`
|
|
143
128
|
/** Other */
|
|
144
129
|
export const REASONRULEOTHER = `${id}#reasonRuleOther`
|
|
145
|
-
/**
|
|
146
|
-
export const
|
|
147
|
-
/**
|
|
148
|
-
export const
|
|
149
|
-
/**
|
|
150
|
-
export const
|
|
151
|
-
/**
|
|
152
|
-
export const
|
|
153
|
-
/**
|
|
154
|
-
export const
|
|
130
|
+
/** Content promoting or depicting self-harm */
|
|
131
|
+
export const REASONSELFHARMCONTENT = `${id}#reasonSelfHarmContent`
|
|
132
|
+
/** Eating disorders */
|
|
133
|
+
export const REASONSELFHARMED = `${id}#reasonSelfHarmED`
|
|
134
|
+
/** Dangerous challenges or activities */
|
|
135
|
+
export const REASONSELFHARMSTUNTS = `${id}#reasonSelfHarmStunts`
|
|
136
|
+
/** Dangerous substances or drug abuse */
|
|
137
|
+
export const REASONSELFHARMSUBSTANCES = `${id}#reasonSelfHarmSubstances`
|
|
138
|
+
/** Other dangerous content */
|
|
139
|
+
export const REASONSELFHARMOTHER = `${id}#reasonSelfHarmOther`
|
|
@@ -4,6 +4,7 @@ import { OzoneConfig } from '../config'
|
|
|
4
4
|
import {
|
|
5
5
|
REASONAPPEAL,
|
|
6
6
|
REASONMISLEADING,
|
|
7
|
+
REASONOTHER,
|
|
7
8
|
REASONRUDE,
|
|
8
9
|
REASONSEXUAL,
|
|
9
10
|
REASONSPAM,
|
|
@@ -13,58 +14,53 @@ import { httpLogger } from '../logger'
|
|
|
13
14
|
|
|
14
15
|
// Reverse mapping from new ozone namespaced reason types to old com.atproto namespaced reason types
|
|
15
16
|
export const NEW_TO_OLD_REASON_MAPPING: Record<string, string> = {
|
|
16
|
-
'tools.ozone.report.defs#reasonMisleadingSpam': REASONSPAM,
|
|
17
|
-
'tools.ozone.report.defs#reasonRuleOther': REASONVIOLATION,
|
|
18
|
-
'tools.ozone.report.defs#reasonMisleadingOther': REASONMISLEADING,
|
|
19
|
-
'tools.ozone.report.defs#reasonSexualUnlabeled': REASONSEXUAL,
|
|
20
|
-
'tools.ozone.report.defs#reasonHarassmentOther': REASONRUDE,
|
|
21
17
|
'tools.ozone.report.defs#reasonAppeal': REASONAPPEAL,
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
'tools.ozone.report.defs#reasonOther': REASONOTHER,
|
|
19
|
+
|
|
20
|
+
'tools.ozone.report.defs#reasonViolenceAnimal': REASONVIOLATION,
|
|
24
21
|
'tools.ozone.report.defs#reasonViolenceThreats': REASONVIOLATION,
|
|
25
22
|
'tools.ozone.report.defs#reasonViolenceGraphicContent': REASONVIOLATION,
|
|
26
|
-
'tools.ozone.report.defs#reasonViolenceSelfHarm': REASONVIOLATION,
|
|
27
23
|
'tools.ozone.report.defs#reasonViolenceGlorification': REASONVIOLATION,
|
|
28
24
|
'tools.ozone.report.defs#reasonViolenceExtremistContent': REASONVIOLATION,
|
|
29
25
|
'tools.ozone.report.defs#reasonViolenceTrafficking': REASONVIOLATION,
|
|
30
26
|
'tools.ozone.report.defs#reasonViolenceOther': REASONVIOLATION,
|
|
31
|
-
|
|
27
|
+
|
|
32
28
|
'tools.ozone.report.defs#reasonSexualAbuseContent': REASONSEXUAL,
|
|
33
29
|
'tools.ozone.report.defs#reasonSexualNCII': REASONSEXUAL,
|
|
34
|
-
'tools.ozone.report.defs#reasonSexualSextortion': REASONSEXUAL,
|
|
35
30
|
'tools.ozone.report.defs#reasonSexualDeepfake': REASONSEXUAL,
|
|
36
31
|
'tools.ozone.report.defs#reasonSexualAnimal': REASONSEXUAL,
|
|
32
|
+
'tools.ozone.report.defs#reasonSexualUnlabeled': REASONSEXUAL,
|
|
37
33
|
'tools.ozone.report.defs#reasonSexualOther': REASONSEXUAL,
|
|
38
|
-
|
|
34
|
+
|
|
39
35
|
'tools.ozone.report.defs#reasonChildSafetyCSAM': REASONVIOLATION,
|
|
40
36
|
'tools.ozone.report.defs#reasonChildSafetyGroom': REASONVIOLATION,
|
|
41
|
-
'tools.ozone.report.defs#
|
|
42
|
-
'tools.ozone.report.defs#reasonChildSafetyEndangerment': REASONVIOLATION,
|
|
37
|
+
'tools.ozone.report.defs#reasonChildSafetyPrivacy': REASONVIOLATION,
|
|
43
38
|
'tools.ozone.report.defs#reasonChildSafetyHarassment': REASONVIOLATION,
|
|
44
|
-
'tools.ozone.report.defs#reasonChildSafetyPromotion': REASONVIOLATION,
|
|
45
39
|
'tools.ozone.report.defs#reasonChildSafetyOther': REASONVIOLATION,
|
|
46
|
-
|
|
40
|
+
|
|
47
41
|
'tools.ozone.report.defs#reasonHarassmentTroll': REASONRUDE,
|
|
48
42
|
'tools.ozone.report.defs#reasonHarassmentTargeted': REASONRUDE,
|
|
49
43
|
'tools.ozone.report.defs#reasonHarassmentHateSpeech': REASONRUDE,
|
|
50
44
|
'tools.ozone.report.defs#reasonHarassmentDoxxing': REASONRUDE,
|
|
51
|
-
|
|
45
|
+
'tools.ozone.report.defs#reasonHarassmentOther': REASONRUDE,
|
|
46
|
+
|
|
52
47
|
'tools.ozone.report.defs#reasonMisleadingBot': REASONMISLEADING,
|
|
53
48
|
'tools.ozone.report.defs#reasonMisleadingImpersonation': REASONMISLEADING,
|
|
49
|
+
'tools.ozone.report.defs#reasonMisleadingSpam': REASONSPAM,
|
|
54
50
|
'tools.ozone.report.defs#reasonMisleadingScam': REASONMISLEADING,
|
|
55
|
-
'tools.ozone.report.defs#
|
|
56
|
-
'tools.ozone.report.defs#
|
|
57
|
-
|
|
51
|
+
'tools.ozone.report.defs#reasonMisleadingElections': REASONMISLEADING,
|
|
52
|
+
'tools.ozone.report.defs#reasonMisleadingOther': REASONMISLEADING,
|
|
53
|
+
|
|
58
54
|
'tools.ozone.report.defs#reasonRuleSiteSecurity': REASONVIOLATION,
|
|
59
|
-
'tools.ozone.report.defs#reasonRuleStolenContent': REASONVIOLATION,
|
|
60
55
|
'tools.ozone.report.defs#reasonRuleProhibitedSales': REASONVIOLATION,
|
|
61
56
|
'tools.ozone.report.defs#reasonRuleBanEvasion': REASONVIOLATION,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
'tools.ozone.report.defs#
|
|
65
|
-
'tools.ozone.report.defs#
|
|
66
|
-
'tools.ozone.report.defs#
|
|
67
|
-
'tools.ozone.report.defs#
|
|
57
|
+
'tools.ozone.report.defs#reasonRuleOther': REASONVIOLATION,
|
|
58
|
+
|
|
59
|
+
'tools.ozone.report.defs#reasonSelfHarmContent': REASONVIOLATION,
|
|
60
|
+
'tools.ozone.report.defs#reasonSelfHarmED': REASONVIOLATION,
|
|
61
|
+
'tools.ozone.report.defs#reasonSelfHarmStunts': REASONVIOLATION,
|
|
62
|
+
'tools.ozone.report.defs#reasonSelfHarmSubstances': REASONVIOLATION,
|
|
63
|
+
'tools.ozone.report.defs#reasonSelfHarmOther': REASONVIOLATION,
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
interface CacheEntry {
|
package/src/mod-service/views.ts
CHANGED
|
@@ -578,8 +578,8 @@ export class ModerationViews {
|
|
|
578
578
|
'moderation_subject_status.blobCids',
|
|
579
579
|
)} @> ${JSON.stringify(blobs.map((blob) => blob.ref.toString()))}`,
|
|
580
580
|
)
|
|
581
|
-
.selectAll()
|
|
582
581
|
.executeTakeFirst()
|
|
582
|
+
|
|
583
583
|
const statusByCid = (modStatusResults?.blobCids || [])?.reduce(
|
|
584
584
|
(acc, cur) => Object.assign(acc, { [cur]: modStatusResults }),
|
|
585
585
|
{},
|
|
@@ -592,6 +592,7 @@ export class ModerationViews {
|
|
|
592
592
|
const subjectStatus = statusByCid[cid]
|
|
593
593
|
? this.formatSubjectStatus(statusByCid[cid])
|
|
594
594
|
: undefined
|
|
595
|
+
|
|
595
596
|
return {
|
|
596
597
|
cid,
|
|
597
598
|
mimeType: blob.mimeType,
|
|
@@ -20,3 +20,200 @@ Object {
|
|
|
20
20
|
],
|
|
21
21
|
}
|
|
22
22
|
`;
|
|
23
|
+
|
|
24
|
+
exports[`blob divert sends blobs to configured divert service and marks divert date 2`] = `
|
|
25
|
+
Object {
|
|
26
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
27
|
+
"createdBy": "user(1)",
|
|
28
|
+
"event": Object {
|
|
29
|
+
"$type": "tools.ozone.moderation.defs#modEventDivert",
|
|
30
|
+
"comment": "Diverting for test",
|
|
31
|
+
},
|
|
32
|
+
"id": 1,
|
|
33
|
+
"subject": Object {
|
|
34
|
+
"$type": "tools.ozone.moderation.defs#recordView",
|
|
35
|
+
"blobCids": Array [
|
|
36
|
+
"cids(1)",
|
|
37
|
+
"cids(2)",
|
|
38
|
+
],
|
|
39
|
+
"cid": "cids(0)",
|
|
40
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
41
|
+
"moderation": Object {
|
|
42
|
+
"subjectStatus": Object {
|
|
43
|
+
"accountStats": Object {
|
|
44
|
+
"$type": "tools.ozone.moderation.defs#accountStats",
|
|
45
|
+
},
|
|
46
|
+
"ageAssuranceState": "unknown",
|
|
47
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
48
|
+
"hosting": Object {
|
|
49
|
+
"$type": "tools.ozone.moderation.defs#recordHosting",
|
|
50
|
+
"status": "unknown",
|
|
51
|
+
},
|
|
52
|
+
"id": 1,
|
|
53
|
+
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
54
|
+
"lastReviewedBy": "user(1)",
|
|
55
|
+
"priorityScore": 0,
|
|
56
|
+
"recordsStats": Object {
|
|
57
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
58
|
+
},
|
|
59
|
+
"reviewState": "tools.ozone.moderation.defs#reviewClosed",
|
|
60
|
+
"subject": Object {
|
|
61
|
+
"$type": "com.atproto.repo.strongRef",
|
|
62
|
+
"cid": "cids(0)",
|
|
63
|
+
"uri": "record(0)",
|
|
64
|
+
},
|
|
65
|
+
"subjectBlobCids": Array [
|
|
66
|
+
"cids(1)",
|
|
67
|
+
"cids(2)",
|
|
68
|
+
],
|
|
69
|
+
"subjectRepoHandle": "carol.test",
|
|
70
|
+
"tags": Array [
|
|
71
|
+
"lang:it",
|
|
72
|
+
"embed:image",
|
|
73
|
+
],
|
|
74
|
+
"takendown": true,
|
|
75
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
"repo": Object {
|
|
79
|
+
"did": "user(0)",
|
|
80
|
+
"handle": "carol.test",
|
|
81
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
82
|
+
"moderation": Object {},
|
|
83
|
+
"relatedRecords": Array [],
|
|
84
|
+
},
|
|
85
|
+
"uri": "record(0)",
|
|
86
|
+
"value": Object {
|
|
87
|
+
"$type": "app.bsky.feed.post",
|
|
88
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
89
|
+
"embed": Object {
|
|
90
|
+
"$type": "app.bsky.embed.recordWithMedia",
|
|
91
|
+
"media": Object {
|
|
92
|
+
"$type": "app.bsky.embed.images",
|
|
93
|
+
"images": Array [
|
|
94
|
+
Object {
|
|
95
|
+
"alt": "../dev-env/assets/key-landscape-small.jpg",
|
|
96
|
+
"image": Object {
|
|
97
|
+
"$type": "blob",
|
|
98
|
+
"mimeType": "image/jpeg",
|
|
99
|
+
"ref": Object {
|
|
100
|
+
"$link": "cids(1)",
|
|
101
|
+
},
|
|
102
|
+
"size": 4114,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
Object {
|
|
106
|
+
"alt": "../dev-env/assets/key-alt.jpg",
|
|
107
|
+
"image": Object {
|
|
108
|
+
"$type": "blob",
|
|
109
|
+
"mimeType": "image/jpeg",
|
|
110
|
+
"ref": Object {
|
|
111
|
+
"$link": "cids(2)",
|
|
112
|
+
},
|
|
113
|
+
"size": 12736,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
"record": Object {
|
|
119
|
+
"record": Object {
|
|
120
|
+
"cid": "cids(3)",
|
|
121
|
+
"uri": "record(1)",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
"text": "hi im carol",
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
"subjectBlobCids": Array [
|
|
129
|
+
"cids(1)",
|
|
130
|
+
"cids(2)",
|
|
131
|
+
],
|
|
132
|
+
"subjectBlobs": Array [
|
|
133
|
+
Object {
|
|
134
|
+
"cid": "cids(1)",
|
|
135
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
136
|
+
"mimeType": "image/jpeg",
|
|
137
|
+
"moderation": Object {
|
|
138
|
+
"subjectStatus": Object {
|
|
139
|
+
"accountStats": Object {
|
|
140
|
+
"$type": "tools.ozone.moderation.defs#accountStats",
|
|
141
|
+
},
|
|
142
|
+
"ageAssuranceState": "unknown",
|
|
143
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
144
|
+
"hosting": Object {
|
|
145
|
+
"$type": "tools.ozone.moderation.defs#recordHosting",
|
|
146
|
+
"status": "unknown",
|
|
147
|
+
},
|
|
148
|
+
"id": 1,
|
|
149
|
+
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
150
|
+
"lastReviewedBy": "user(1)",
|
|
151
|
+
"priorityScore": 0,
|
|
152
|
+
"recordsStats": Object {
|
|
153
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
154
|
+
},
|
|
155
|
+
"reviewState": "tools.ozone.moderation.defs#reviewClosed",
|
|
156
|
+
"subject": Object {
|
|
157
|
+
"$type": "com.atproto.repo.strongRef",
|
|
158
|
+
"cid": "cids(0)",
|
|
159
|
+
"uri": "record(0)",
|
|
160
|
+
},
|
|
161
|
+
"subjectBlobCids": Array [
|
|
162
|
+
"cids(1)",
|
|
163
|
+
"cids(2)",
|
|
164
|
+
],
|
|
165
|
+
"tags": Array [
|
|
166
|
+
"lang:it",
|
|
167
|
+
"embed:image",
|
|
168
|
+
],
|
|
169
|
+
"takendown": true,
|
|
170
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
"size": 4114,
|
|
174
|
+
},
|
|
175
|
+
Object {
|
|
176
|
+
"cid": "cids(2)",
|
|
177
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
178
|
+
"mimeType": "image/jpeg",
|
|
179
|
+
"moderation": Object {
|
|
180
|
+
"subjectStatus": Object {
|
|
181
|
+
"accountStats": Object {
|
|
182
|
+
"$type": "tools.ozone.moderation.defs#accountStats",
|
|
183
|
+
},
|
|
184
|
+
"ageAssuranceState": "unknown",
|
|
185
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
186
|
+
"hosting": Object {
|
|
187
|
+
"$type": "tools.ozone.moderation.defs#recordHosting",
|
|
188
|
+
"status": "unknown",
|
|
189
|
+
},
|
|
190
|
+
"id": 1,
|
|
191
|
+
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
192
|
+
"lastReviewedBy": "user(1)",
|
|
193
|
+
"priorityScore": 0,
|
|
194
|
+
"recordsStats": Object {
|
|
195
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
196
|
+
},
|
|
197
|
+
"reviewState": "tools.ozone.moderation.defs#reviewClosed",
|
|
198
|
+
"subject": Object {
|
|
199
|
+
"$type": "com.atproto.repo.strongRef",
|
|
200
|
+
"cid": "cids(0)",
|
|
201
|
+
"uri": "record(0)",
|
|
202
|
+
},
|
|
203
|
+
"subjectBlobCids": Array [
|
|
204
|
+
"cids(1)",
|
|
205
|
+
"cids(2)",
|
|
206
|
+
],
|
|
207
|
+
"tags": Array [
|
|
208
|
+
"lang:it",
|
|
209
|
+
"embed:image",
|
|
210
|
+
],
|
|
211
|
+
"takendown": true,
|
|
212
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
"size": 12736,
|
|
216
|
+
},
|
|
217
|
+
],
|
|
218
|
+
}
|
|
219
|
+
`;
|
|
@@ -95,6 +95,9 @@ describe('blob divert', () => {
|
|
|
95
95
|
})
|
|
96
96
|
|
|
97
97
|
expect(subjectStatuses[0].takendown).toBe(true)
|
|
98
|
+
|
|
99
|
+
const event = await modClient.getEvent(divertEvent.id)
|
|
100
|
+
expect(forSnapshot(event)).toMatchSnapshot()
|
|
98
101
|
} finally {
|
|
99
102
|
reportServiceRequest.mockRestore()
|
|
100
103
|
}
|