Skip to content

Commit

Permalink
Add mod-authority.test to dev-env
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee committed Mar 9, 2024
1 parent 7452bb0 commit 3129559
Showing 1 changed file with 357 additions and 0 deletions.
357 changes: 357 additions & 0 deletions packages/dev-env/src/mock/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,363 @@ export async function generateMockSetup(env: TestNetwork) {
},
)

// create the dev-env moderator
{
const res = await clients.loggedout.api.com.atproto.server.createAccount({
email: '[email protected]',
handle: 'mod-authority.test',
password: 'hunter2',
})
const agent = env.pds.getClient()
agent.api.setHeader('Authorization', `Bearer ${res.data.accessJwt}`)
await agent.api.app.bsky.actor.profile.create(
{ repo: res.data.did },
{
displayName: 'Dev-env Moderation',
description: `The pretend version of mod.bsky.app`,
},
)

await agent.api.app.bsky.labeler.service.create(
{ repo: res.data.did, rkey: 'self' },
{
policies: {
labelValues: [
'!hide',
'!warn',
'porn',
'sexual',
'nudity',
'sexual-figurative',
'graphic-media',
'gore',
'upsetting',
'sensitive',
'self-harm',
'intolerant',
'extremist',
'rude',
'threat',
'harassment',
'spam',
'engagement-farming',
'impersonation',
'inauthentic',
'scam',
'security',
'misleading',
'misinformation',
'unsafe-link',
'illegal',
],
labelValueDefinitions: [
{
identifier: 'spam',
blurs: 'content',
severity: 'info',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Spam',
description:
'Activity that is unsolicited, repetitive, or irrelevant, and intrusive to users. Inclusive of replies, mentions, follows, likes, and notifications that are used in a spammy manner.',
},
],
},
{
identifier: 'impersonation',
blurs: 'none',
severity: 'info',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Impersonation',
description:
'Attempting to deceive users by mimicking the identity of another person, brand, or entity without authorization. This includes using similar usernames, profile pictures, and posting content that falsely represents the impersonated party.',
},
],
},
{
identifier: 'scam',
blurs: 'content',
severity: 'warn',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Scam',
description:
'Engaging in deceptive practices aimed at defrauding or misleading users, such as fraudulent offers, phishing attempts, or false claims to solicit personal information or financial gain. This includes fake giveaways, investment scams, and counterfeit sales',
},
],
},
{
identifier: 'intolerant',
blurs: 'content',
severity: 'warn',
defaultSetting: 'warn',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Intolerance',
description:
'Includes hateful, intolerant, or discriminatory views against individuals or groups based on gender, race, religion or other protected characteristics.',
},
],
},
{
identifier: 'self-harm',
blurs: 'content',
severity: 'warn',
defaultSetting: 'warn',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Self-Harm',
description:
'Depicts or promotes self-injurious behavior, including cutting, self-mutilation, or suicide attempts. This includes graphic imagery, discussions that glorify or encourage self-harm, and potentially triggering narratives related to self-injury.',
},
],
},
{
identifier: 'security',
blurs: 'content',
severity: 'warn',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Security Concerns',
description:
"Potentially harmful to users' online safety, including malware distribution, phishing attempts, or signs of a compromised account. This encompasses links to possible malicious software, deceptive practices aimed at stealing personal information, and unusual account behavior indicating unauthorized access.",
},
],
},
{
identifier: 'misleading',
blurs: 'content',
severity: 'warn',
defaultSetting: 'warn',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Misleading',
description:
'Presents false information that misleads users, including manipulated media, text hacks, link misdirects, fake websites, or fraudulent claims. ',
},
],
},
{
identifier: 'threat',
blurs: 'content',
severity: 'info',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Threats',
description:
'Intentions of violence or harm towards individuals or groups, including direct threats, incitement of violence, or advocating for physical or psychological harm. This includes specific threats of violence, encouragement of dangerous activities, and any communication intended to intimidate or coerce',
},
],
},
{
identifier: 'unsafe-link',
blurs: '',
severity: '',
defaultSetting: '',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Unsafe link',
description:
'URLs that may lead to harmful websites, including those hosting malware, phishing schemes, or content that violates community guidelines. This includes links that may compromise user security, privacy, or expose them to deceptive or inappropriate content.',
},
],
},
{
identifier: 'illegal',
blurs: 'content',
severity: 'warn',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Illegal',
description:
'Promotion, sale, or facilitation of goods, services, or activities that violate laws, including but not limited to unauthorized drugs, weapons sales, human trafficking, or promoting dangerous illegal acts. This encompasses any content that encourages or aids in the commission of unlawful behavior',
},
],
},
{
identifier: 'misinformation',
blurs: 'content',
severity: 'info',
defaultSetting: 'warn',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Misinformation',
description:
'Inaccurate or misleading, including unverified claims, facts that have been proven false, and conspiracy theories without credible support. This includes information that could lead to public confusion, health risks, or undermine public trust on important matters, such as elections. ',
},
],
},
{
identifier: 'rude',
blurs: 'content',
severity: 'info',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Rude',
description:
'May not violate specific community standards but is characterized by discourtesy or impoliteness, including crude language, disrespectful comments, or aggressive tones. This includes interactions that are unnecessarily harsh, confrontational, or lacking in constructive purpose.',
},
],
},
{
identifier: 'extremist',
blurs: 'content',
severity: 'warn',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Extremist',
description:
'Promotion, support, or advocacy of radical ideologies that advocate for violence, hate, or discrimination against individuals or groups.',
},
],
},
{
identifier: 'harassment',
blurs: 'content',
severity: 'warn',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Harassment',
description:
'Targeted, aggressive behavior intended to intimidate, bully, or demean individuals or groups. This includes persistent unwanted contact, threats, derogatory comments, and the sharing of personal information without consent.',
},
],
},
{
identifier: 'sensitive',
blurs: 'content',
severity: 'warn',
defaultSetting: 'warn',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Sensitive',
description:
'Could be distressing or triggering to some users, including depictions or discussions of substance abuse, eating disorders, and other mental health issues. It aims to caution viewers about potentially difficult subjects that may affect their well-being or evoke strong emotional responses.',
},
],
},
{
identifier: 'engagement-farming',
blurs: 'content',
severity: 'warn',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Engagement Farming',
description:
'Pattern of content and/or bulk interactions which seems insincere and with the purpose of building a large following. Inclusive of follow, post, mention and like behaviours, along with accounts that churn these activities to gain attention or disrupt the user experience. ',
},
],
},
{
identifier: 'inauthentic',
blurs: 'content',
severity: 'warn',
defaultSetting: 'hide',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Inauthentic Account',
description:
'Account is not what it appears. Might be a bot pretending to be a human, or a human misleadingly pretending to be a different demographic or identity group.',
},
],
},
{
identifier: 'upsetting',
blurs: 'content',
severity: 'warn',
defaultSetting: 'warn',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Upsetting',
description:
'Could cause cause emotional distress or discomfort to viewers. This includes intense emotional confrontations, discussions of traumatic events, or any material that could be considered distressing or deeply troubling.',
},
],
},
{
identifier: 'sexual-figurative',
blurs: 'media',
severity: 'none',
defaultSetting: 'ignore',
adultOnly: true,
locales: [
{
lang: 'en',
name: 'Sexually Suggestive (Cartoon)',
description:
'Drawn, painted or digital art that is explicitly sexual or employs suggestive elements to evoke sexual themes, through provocative posts, partially concealed nudity to suggest sexual content. ',
},
],
},
{
identifier: 'gore',
blurs: 'media',
severity: 'warn',
defaultSetting: 'warn',
adultOnly: false,
locales: [
{
lang: 'en',
name: 'Graphic Imagery (Gore)',
description:
'Graphically depicts violence, injuries, or bodily harm, which may be shocking or disturbing to viewers. This includes scenes of accidents, surgical procedures, or explicit violence in both real-life and fictional contexts.',
},
],
},
],
},
createdAt: date.next().value,
},
)
}

// create a labeler account
{
const res = await clients.loggedout.api.com.atproto.server.createAccount({
Expand Down

0 comments on commit 3129559

Please sign in to comment.