@atproto/api 0.12.8 → 0.12.10
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 +12 -0
- package/dist/client/index.d.ts +102 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +300 -3
- package/dist/client/index.js.map +1 -1
- package/dist/client/lexicons.d.ts +907 -0
- package/dist/client/lexicons.d.ts.map +1 -1
- package/dist/client/lexicons.js +932 -0
- package/dist/client/lexicons.js.map +1 -1
- package/dist/client/types/app/bsky/actor/defs.d.ts +7 -0
- package/dist/client/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/client/types/app/bsky/actor/defs.js +11 -1
- package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/client/types/chat/bsky/actor/declaration.d.ts +11 -0
- package/dist/client/types/chat/bsky/actor/declaration.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/actor/declaration.js +17 -0
- package/dist/client/types/chat/bsky/actor/declaration.js.map +1 -0
- package/dist/client/types/chat/bsky/actor/defs.d.ts +21 -0
- package/dist/client/types/chat/bsky/actor/defs.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/actor/defs.js +16 -0
- package/dist/client/types/chat/bsky/actor/defs.js.map +1 -0
- package/dist/client/types/chat/bsky/actor/deleteAccount.d.ts +21 -0
- package/dist/client/types/chat/bsky/actor/deleteAccount.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/actor/deleteAccount.js +14 -0
- package/dist/client/types/chat/bsky/actor/deleteAccount.js.map +1 -0
- package/dist/client/types/chat/bsky/actor/exportAccountData.d.ts +17 -0
- package/dist/client/types/chat/bsky/actor/exportAccountData.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/actor/exportAccountData.js +14 -0
- package/dist/client/types/chat/bsky/actor/exportAccountData.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/defs.d.ts +109 -0
- package/dist/client/types/chat/bsky/convo/defs.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/defs.js +106 -0
- package/dist/client/types/chat/bsky/convo/defs.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/deleteMessageForSelf.d.ts +25 -0
- package/dist/client/types/chat/bsky/convo/deleteMessageForSelf.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/deleteMessageForSelf.js +14 -0
- package/dist/client/types/chat/bsky/convo/deleteMessageForSelf.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/getConvo.d.ts +23 -0
- package/dist/client/types/chat/bsky/convo/getConvo.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/getConvo.js +14 -0
- package/dist/client/types/chat/bsky/convo/getConvo.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/getConvoForMembers.d.ts +23 -0
- package/dist/client/types/chat/bsky/convo/getConvoForMembers.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/getConvoForMembers.js +14 -0
- package/dist/client/types/chat/bsky/convo/getConvoForMembers.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/getLog.d.ts +27 -0
- package/dist/client/types/chat/bsky/convo/getLog.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/getLog.js +14 -0
- package/dist/client/types/chat/bsky/convo/getLog.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/getMessages.d.ts +29 -0
- package/dist/client/types/chat/bsky/convo/getMessages.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/getMessages.js +14 -0
- package/dist/client/types/chat/bsky/convo/getMessages.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/leaveConvo.d.ts +27 -0
- package/dist/client/types/chat/bsky/convo/leaveConvo.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/leaveConvo.js +14 -0
- package/dist/client/types/chat/bsky/convo/leaveConvo.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/listConvos.d.ts +25 -0
- package/dist/client/types/chat/bsky/convo/listConvos.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/listConvos.js +14 -0
- package/dist/client/types/chat/bsky/convo/listConvos.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/muteConvo.d.ts +27 -0
- package/dist/client/types/chat/bsky/convo/muteConvo.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/muteConvo.js +14 -0
- package/dist/client/types/chat/bsky/convo/muteConvo.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/sendMessage.d.ts +25 -0
- package/dist/client/types/chat/bsky/convo/sendMessage.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/sendMessage.js +14 -0
- package/dist/client/types/chat/bsky/convo/sendMessage.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/sendMessageBatch.d.ts +35 -0
- package/dist/client/types/chat/bsky/convo/sendMessageBatch.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/sendMessageBatch.js +26 -0
- package/dist/client/types/chat/bsky/convo/sendMessageBatch.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/unmuteConvo.d.ts +27 -0
- package/dist/client/types/chat/bsky/convo/unmuteConvo.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/unmuteConvo.js +14 -0
- package/dist/client/types/chat/bsky/convo/unmuteConvo.js.map +1 -0
- package/dist/client/types/chat/bsky/convo/updateRead.d.ts +28 -0
- package/dist/client/types/chat/bsky/convo/updateRead.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/convo/updateRead.js +14 -0
- package/dist/client/types/chat/bsky/convo/updateRead.js.map +1 -0
- package/dist/client/types/chat/bsky/moderation/getActorMetadata.d.ts +34 -0
- package/dist/client/types/chat/bsky/moderation/getActorMetadata.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/moderation/getActorMetadata.js +26 -0
- package/dist/client/types/chat/bsky/moderation/getActorMetadata.js.map +1 -0
- package/dist/client/types/chat/bsky/moderation/getMessageContext.d.ts +28 -0
- package/dist/client/types/chat/bsky/moderation/getMessageContext.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/moderation/getMessageContext.js +14 -0
- package/dist/client/types/chat/bsky/moderation/getMessageContext.js.map +1 -0
- package/dist/client/types/chat/bsky/moderation/updateActorAccess.d.ts +23 -0
- package/dist/client/types/chat/bsky/moderation/updateActorAccess.d.ts.map +1 -0
- package/dist/client/types/chat/bsky/moderation/updateActorAccess.js +14 -0
- package/dist/client/types/chat/bsky/moderation/updateActorAccess.js.map +1 -0
- package/dist/moderation/decision.d.ts.map +1 -1
- package/dist/moderation/decision.js +12 -6
- package/dist/moderation/decision.js.map +1 -1
- package/package.json +3 -3
- package/src/client/index.ts +349 -0
- package/src/client/lexicons.ts +933 -0
- package/src/client/types/app/bsky/actor/defs.ts +20 -0
- package/src/client/types/chat/bsky/actor/declaration.ts +25 -0
- package/src/client/types/chat/bsky/actor/defs.ts +34 -0
- package/src/client/types/chat/bsky/actor/deleteAccount.ts +33 -0
- package/src/client/types/chat/bsky/actor/exportAccountData.ts +28 -0
- package/src/client/types/chat/bsky/convo/defs.ts +215 -0
- package/src/client/types/chat/bsky/convo/deleteMessageForSelf.ts +37 -0
- package/src/client/types/chat/bsky/convo/getConvo.ts +36 -0
- package/src/client/types/chat/bsky/convo/getConvoForMembers.ts +36 -0
- package/src/client/types/chat/bsky/convo/getLog.ts +43 -0
- package/src/client/types/chat/bsky/convo/getMessages.ts +43 -0
- package/src/client/types/chat/bsky/convo/leaveConvo.ts +39 -0
- package/src/client/types/chat/bsky/convo/listConvos.ts +38 -0
- package/src/client/types/chat/bsky/convo/muteConvo.ts +39 -0
- package/src/client/types/chat/bsky/convo/sendMessage.ts +37 -0
- package/src/client/types/chat/bsky/convo/sendMessageBatch.ts +57 -0
- package/src/client/types/chat/bsky/convo/unmuteConvo.ts +39 -0
- package/src/client/types/chat/bsky/convo/updateRead.ts +40 -0
- package/src/client/types/chat/bsky/moderation/getActorMetadata.ts +57 -0
- package/src/client/types/chat/bsky/moderation/getMessageContext.ts +42 -0
- package/src/client/types/chat/bsky/moderation/updateActorAccess.ts +34 -0
- package/src/moderation/decision.ts +12 -6
- package/tests/moderation-behaviors.test.ts +45 -8
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as ChatBskyConvoDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {}
|
|
12
|
+
|
|
13
|
+
export interface InputSchema {
|
|
14
|
+
convoId: string
|
|
15
|
+
message: ChatBskyConvoDefs.Message
|
|
16
|
+
[k: string]: unknown
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type OutputSchema = ChatBskyConvoDefs.MessageView
|
|
20
|
+
|
|
21
|
+
export interface CallOptions {
|
|
22
|
+
headers?: Headers
|
|
23
|
+
qp?: QueryParams
|
|
24
|
+
encoding: 'application/json'
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: Headers
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
if (e instanceof XRPCError) {
|
|
35
|
+
}
|
|
36
|
+
return e
|
|
37
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as ChatBskyConvoDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {}
|
|
12
|
+
|
|
13
|
+
export interface InputSchema {
|
|
14
|
+
items: BatchItem[]
|
|
15
|
+
[k: string]: unknown
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface OutputSchema {
|
|
19
|
+
items: ChatBskyConvoDefs.MessageView[]
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CallOptions {
|
|
24
|
+
headers?: Headers
|
|
25
|
+
qp?: QueryParams
|
|
26
|
+
encoding: 'application/json'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface Response {
|
|
30
|
+
success: boolean
|
|
31
|
+
headers: Headers
|
|
32
|
+
data: OutputSchema
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function toKnownErr(e: any) {
|
|
36
|
+
if (e instanceof XRPCError) {
|
|
37
|
+
}
|
|
38
|
+
return e
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface BatchItem {
|
|
42
|
+
convoId: string
|
|
43
|
+
message: ChatBskyConvoDefs.Message
|
|
44
|
+
[k: string]: unknown
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function isBatchItem(v: unknown): v is BatchItem {
|
|
48
|
+
return (
|
|
49
|
+
isObj(v) &&
|
|
50
|
+
hasProp(v, '$type') &&
|
|
51
|
+
v.$type === 'chat.bsky.convo.sendMessageBatch#batchItem'
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function validateBatchItem(v: unknown): ValidationResult {
|
|
56
|
+
return lexicons.validate('chat.bsky.convo.sendMessageBatch#batchItem', v)
|
|
57
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as ChatBskyConvoDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {}
|
|
12
|
+
|
|
13
|
+
export interface InputSchema {
|
|
14
|
+
convoId: string
|
|
15
|
+
[k: string]: unknown
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface OutputSchema {
|
|
19
|
+
convo: ChatBskyConvoDefs.ConvoView
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CallOptions {
|
|
24
|
+
headers?: Headers
|
|
25
|
+
qp?: QueryParams
|
|
26
|
+
encoding: 'application/json'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface Response {
|
|
30
|
+
success: boolean
|
|
31
|
+
headers: Headers
|
|
32
|
+
data: OutputSchema
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function toKnownErr(e: any) {
|
|
36
|
+
if (e instanceof XRPCError) {
|
|
37
|
+
}
|
|
38
|
+
return e
|
|
39
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as ChatBskyConvoDefs from './defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {}
|
|
12
|
+
|
|
13
|
+
export interface InputSchema {
|
|
14
|
+
convoId: string
|
|
15
|
+
messageId?: string
|
|
16
|
+
[k: string]: unknown
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
convo: ChatBskyConvoDefs.ConvoView
|
|
21
|
+
[k: string]: unknown
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface CallOptions {
|
|
25
|
+
headers?: Headers
|
|
26
|
+
qp?: QueryParams
|
|
27
|
+
encoding: 'application/json'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface Response {
|
|
31
|
+
success: boolean
|
|
32
|
+
headers: Headers
|
|
33
|
+
data: OutputSchema
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function toKnownErr(e: any) {
|
|
37
|
+
if (e instanceof XRPCError) {
|
|
38
|
+
}
|
|
39
|
+
return e
|
|
40
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {
|
|
11
|
+
actor: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type InputSchema = undefined
|
|
15
|
+
|
|
16
|
+
export interface OutputSchema {
|
|
17
|
+
day: Metadata
|
|
18
|
+
month: Metadata
|
|
19
|
+
all: Metadata
|
|
20
|
+
[k: string]: unknown
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CallOptions {
|
|
24
|
+
headers?: Headers
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Response {
|
|
28
|
+
success: boolean
|
|
29
|
+
headers: Headers
|
|
30
|
+
data: OutputSchema
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function toKnownErr(e: any) {
|
|
34
|
+
if (e instanceof XRPCError) {
|
|
35
|
+
}
|
|
36
|
+
return e
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface Metadata {
|
|
40
|
+
messagesSent: number
|
|
41
|
+
messagesReceived: number
|
|
42
|
+
convos: number
|
|
43
|
+
convosStarted: number
|
|
44
|
+
[k: string]: unknown
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function isMetadata(v: unknown): v is Metadata {
|
|
48
|
+
return (
|
|
49
|
+
isObj(v) &&
|
|
50
|
+
hasProp(v, '$type') &&
|
|
51
|
+
v.$type === 'chat.bsky.moderation.getActorMetadata#metadata'
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function validateMetadata(v: unknown): ValidationResult {
|
|
56
|
+
return lexicons.validate('chat.bsky.moderation.getActorMetadata#metadata', v)
|
|
57
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
import * as ChatBskyConvoDefs from '../convo/defs'
|
|
10
|
+
|
|
11
|
+
export interface QueryParams {
|
|
12
|
+
messageId: string
|
|
13
|
+
before?: number
|
|
14
|
+
after?: number
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type InputSchema = undefined
|
|
18
|
+
|
|
19
|
+
export interface OutputSchema {
|
|
20
|
+
messages: (
|
|
21
|
+
| ChatBskyConvoDefs.MessageView
|
|
22
|
+
| ChatBskyConvoDefs.DeletedMessageView
|
|
23
|
+
| { $type: string; [k: string]: unknown }
|
|
24
|
+
)[]
|
|
25
|
+
[k: string]: unknown
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface CallOptions {
|
|
29
|
+
headers?: Headers
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface Response {
|
|
33
|
+
success: boolean
|
|
34
|
+
headers: Headers
|
|
35
|
+
data: OutputSchema
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function toKnownErr(e: any) {
|
|
39
|
+
if (e instanceof XRPCError) {
|
|
40
|
+
}
|
|
41
|
+
return e
|
|
42
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { Headers, XRPCError } from '@atproto/xrpc'
|
|
5
|
+
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { isObj, hasProp } from '../../../../util'
|
|
7
|
+
import { lexicons } from '../../../../lexicons'
|
|
8
|
+
import { CID } from 'multiformats/cid'
|
|
9
|
+
|
|
10
|
+
export interface QueryParams {}
|
|
11
|
+
|
|
12
|
+
export interface InputSchema {
|
|
13
|
+
actor: string
|
|
14
|
+
allowAccess: boolean
|
|
15
|
+
ref?: string
|
|
16
|
+
[k: string]: unknown
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CallOptions {
|
|
20
|
+
headers?: Headers
|
|
21
|
+
qp?: QueryParams
|
|
22
|
+
encoding: 'application/json'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Response {
|
|
26
|
+
success: boolean
|
|
27
|
+
headers: Headers
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function toKnownErr(e: any) {
|
|
31
|
+
if (e instanceof XRPCError) {
|
|
32
|
+
}
|
|
33
|
+
return e
|
|
34
|
+
}
|
|
@@ -78,15 +78,15 @@ export class ModerationDecision {
|
|
|
78
78
|
|
|
79
79
|
ui(context: keyof ModerationBehavior): ModerationUI {
|
|
80
80
|
const ui = new ModerationUI()
|
|
81
|
-
if (this.isMe) {
|
|
82
|
-
return ui
|
|
83
|
-
}
|
|
84
81
|
for (const cause of this.causes) {
|
|
85
82
|
if (
|
|
86
83
|
cause.type === 'blocking' ||
|
|
87
84
|
cause.type === 'blocked-by' ||
|
|
88
85
|
cause.type === 'block-other'
|
|
89
86
|
) {
|
|
87
|
+
if (this.isMe) {
|
|
88
|
+
continue
|
|
89
|
+
}
|
|
90
90
|
if (context === 'profileList' || context === 'contentList') {
|
|
91
91
|
ui.filters.push(cause)
|
|
92
92
|
}
|
|
@@ -101,6 +101,9 @@ export class ModerationDecision {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
} else if (cause.type === 'muted') {
|
|
104
|
+
if (this.isMe) {
|
|
105
|
+
continue
|
|
106
|
+
}
|
|
104
107
|
if (context === 'profileList' || context === 'contentList') {
|
|
105
108
|
ui.filters.push(cause)
|
|
106
109
|
}
|
|
@@ -114,6 +117,9 @@ export class ModerationDecision {
|
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
119
|
} else if (cause.type === 'mute-word') {
|
|
120
|
+
if (this.isMe) {
|
|
121
|
+
continue
|
|
122
|
+
}
|
|
117
123
|
if (context === 'contentList') {
|
|
118
124
|
ui.filters.push(cause)
|
|
119
125
|
}
|
|
@@ -141,21 +147,21 @@ export class ModerationDecision {
|
|
|
141
147
|
}
|
|
142
148
|
} else if (cause.type === 'label') {
|
|
143
149
|
if (context === 'profileList' && cause.target === 'account') {
|
|
144
|
-
if (cause.setting === 'hide') {
|
|
150
|
+
if (cause.setting === 'hide' && !this.isMe) {
|
|
145
151
|
ui.filters.push(cause)
|
|
146
152
|
}
|
|
147
153
|
} else if (
|
|
148
154
|
context === 'contentList' &&
|
|
149
155
|
(cause.target === 'account' || cause.target === 'content')
|
|
150
156
|
) {
|
|
151
|
-
if (cause.setting === 'hide') {
|
|
157
|
+
if (cause.setting === 'hide' && !this.isMe) {
|
|
152
158
|
ui.filters.push(cause)
|
|
153
159
|
}
|
|
154
160
|
}
|
|
155
161
|
if (!cause.downgraded) {
|
|
156
162
|
if (cause.behavior[context] === 'blur') {
|
|
157
163
|
ui.blurs.push(cause)
|
|
158
|
-
if (cause.noOverride) {
|
|
164
|
+
if (cause.noOverride && !this.isMe) {
|
|
159
165
|
ui.noOverride = true
|
|
160
166
|
}
|
|
161
167
|
} else if (cause.behavior[context] === 'alert') {
|
|
@@ -536,14 +536,26 @@ const SCENARIOS: SuiteScenarios = {
|
|
|
536
536
|
subject: 'profile',
|
|
537
537
|
author: 'self',
|
|
538
538
|
labels: { account: ['!hide'] },
|
|
539
|
-
behaviors: {
|
|
539
|
+
behaviors: {
|
|
540
|
+
avatar: ['blur'],
|
|
541
|
+
banner: ['blur'],
|
|
542
|
+
displayName: ['blur'],
|
|
543
|
+
profileList: ['blur'],
|
|
544
|
+
profileView: ['blur'],
|
|
545
|
+
contentList: ['blur'],
|
|
546
|
+
contentView: ['blur'],
|
|
547
|
+
},
|
|
540
548
|
},
|
|
541
549
|
'Self-profile: !hide on profile': {
|
|
542
550
|
cfg: 'none',
|
|
543
551
|
subject: 'profile',
|
|
544
552
|
author: 'self',
|
|
545
553
|
labels: { profile: ['!hide'] },
|
|
546
|
-
behaviors: {
|
|
554
|
+
behaviors: {
|
|
555
|
+
avatar: ['blur'],
|
|
556
|
+
banner: ['blur'],
|
|
557
|
+
displayName: ['blur'],
|
|
558
|
+
},
|
|
547
559
|
},
|
|
548
560
|
|
|
549
561
|
"Self-post: Imperative label ('!hide') on post": {
|
|
@@ -551,21 +563,34 @@ const SCENARIOS: SuiteScenarios = {
|
|
|
551
563
|
subject: 'post',
|
|
552
564
|
author: 'self',
|
|
553
565
|
labels: { post: ['!hide'] },
|
|
554
|
-
behaviors: {
|
|
566
|
+
behaviors: {
|
|
567
|
+
contentView: ['blur'],
|
|
568
|
+
contentList: ['blur'],
|
|
569
|
+
},
|
|
555
570
|
},
|
|
556
571
|
"Self-post: Imperative label ('!hide') on author profile": {
|
|
557
572
|
cfg: 'none',
|
|
558
573
|
subject: 'post',
|
|
559
574
|
author: 'self',
|
|
560
575
|
labels: { profile: ['!hide'] },
|
|
561
|
-
behaviors: {
|
|
576
|
+
behaviors: {
|
|
577
|
+
avatar: ['blur'],
|
|
578
|
+
banner: ['blur'],
|
|
579
|
+
displayName: ['blur'],
|
|
580
|
+
},
|
|
562
581
|
},
|
|
563
582
|
"Self-post: Imperative label ('!hide') on author account": {
|
|
564
583
|
cfg: 'none',
|
|
565
584
|
subject: 'post',
|
|
566
585
|
author: 'self',
|
|
567
586
|
labels: { account: ['!hide'] },
|
|
568
|
-
behaviors: {
|
|
587
|
+
behaviors: {
|
|
588
|
+
avatar: ['blur'],
|
|
589
|
+
banner: ['blur'],
|
|
590
|
+
displayName: ['blur'],
|
|
591
|
+
contentList: ['blur'],
|
|
592
|
+
contentView: ['blur'],
|
|
593
|
+
},
|
|
569
594
|
},
|
|
570
595
|
|
|
571
596
|
"Self-post: Imperative label ('!warn') on post": {
|
|
@@ -573,21 +598,33 @@ const SCENARIOS: SuiteScenarios = {
|
|
|
573
598
|
subject: 'post',
|
|
574
599
|
author: 'self',
|
|
575
600
|
labels: { post: ['!warn'] },
|
|
576
|
-
behaviors: {
|
|
601
|
+
behaviors: {
|
|
602
|
+
contentView: ['blur'],
|
|
603
|
+
contentList: ['blur'],
|
|
604
|
+
},
|
|
577
605
|
},
|
|
578
606
|
"Self-post: Imperative label ('!warn') on author profile": {
|
|
579
607
|
cfg: 'none',
|
|
580
608
|
subject: 'post',
|
|
581
609
|
author: 'self',
|
|
582
610
|
labels: { profile: ['!warn'] },
|
|
583
|
-
behaviors: {
|
|
611
|
+
behaviors: {
|
|
612
|
+
avatar: ['blur'],
|
|
613
|
+
banner: ['blur'],
|
|
614
|
+
displayName: ['blur'],
|
|
615
|
+
},
|
|
584
616
|
},
|
|
585
617
|
"Self-post: Imperative label ('!warn') on author account": {
|
|
586
618
|
cfg: 'none',
|
|
587
619
|
subject: 'post',
|
|
588
620
|
author: 'self',
|
|
589
621
|
labels: { account: ['!warn'] },
|
|
590
|
-
behaviors: {
|
|
622
|
+
behaviors: {
|
|
623
|
+
avatar: ['blur'],
|
|
624
|
+
banner: ['blur'],
|
|
625
|
+
contentList: ['blur'],
|
|
626
|
+
contentView: ['blur'],
|
|
627
|
+
},
|
|
591
628
|
},
|
|
592
629
|
|
|
593
630
|
'Mute/block: Blocking user': {
|