diff --git a/lexicons/com/atproto/admin/defs.json b/lexicons/com/atproto/admin/defs.json index dcded1387d3..fae60e45cf7 100644 --- a/lexicons/com/atproto/admin/defs.json +++ b/lexicons/com/atproto/admin/defs.json @@ -557,6 +557,10 @@ "subjectLine": { "type": "string", "description": "The subject line of the email sent to the user." + }, + "comment": { + "type": "string", + "description": "Additional comment about the outgoing comm." } } } diff --git a/lexicons/com/atproto/admin/sendEmail.json b/lexicons/com/atproto/admin/sendEmail.json index 8234460d1ba..4c33dcd8951 100644 --- a/lexicons/com/atproto/admin/sendEmail.json +++ b/lexicons/com/atproto/admin/sendEmail.json @@ -14,7 +14,11 @@ "recipientDid": { "type": "string", "format": "did" }, "content": { "type": "string" }, "subject": { "type": "string" }, - "senderDid": { "type": "string", "format": "did" } + "senderDid": { "type": "string", "format": "did" }, + "comment": { + "type": "string", + "description": "Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers" + } } } }, diff --git a/packages/api/src/client/lexicons.ts b/packages/api/src/client/lexicons.ts index 51f3a9f5456..55de861d600 100644 --- a/packages/api/src/client/lexicons.ts +++ b/packages/api/src/client/lexicons.ts @@ -816,6 +816,10 @@ export const schemaDict = { type: 'string', description: 'The subject line of the email sent to the user.', }, + comment: { + type: 'string', + description: 'Additional comment about the outgoing comm.', + }, }, }, }, @@ -1467,6 +1471,11 @@ export const schemaDict = { type: 'string', format: 'did', }, + comment: { + type: 'string', + description: + "Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers", + }, }, }, }, diff --git a/packages/api/src/client/types/com/atproto/admin/defs.ts b/packages/api/src/client/types/com/atproto/admin/defs.ts index cd55a41b97c..42a587bcc62 100644 --- a/packages/api/src/client/types/com/atproto/admin/defs.ts +++ b/packages/api/src/client/types/com/atproto/admin/defs.ts @@ -674,6 +674,8 @@ export function validateModEventUnmute(v: unknown): ValidationResult { export interface ModEventEmail { /** The subject line of the email sent to the user. */ subjectLine: string + /** Additional comment about the outgoing comm. */ + comment?: string [k: string]: unknown } diff --git a/packages/api/src/client/types/com/atproto/admin/sendEmail.ts b/packages/api/src/client/types/com/atproto/admin/sendEmail.ts index 3357ef3f762..4768fc75ca5 100644 --- a/packages/api/src/client/types/com/atproto/admin/sendEmail.ts +++ b/packages/api/src/client/types/com/atproto/admin/sendEmail.ts @@ -14,6 +14,8 @@ export interface InputSchema { content: string subject?: string senderDid: string + /** Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers */ + comment?: string [k: string]: unknown } diff --git a/packages/bsky/src/lexicon/lexicons.ts b/packages/bsky/src/lexicon/lexicons.ts index 51f3a9f5456..55de861d600 100644 --- a/packages/bsky/src/lexicon/lexicons.ts +++ b/packages/bsky/src/lexicon/lexicons.ts @@ -816,6 +816,10 @@ export const schemaDict = { type: 'string', description: 'The subject line of the email sent to the user.', }, + comment: { + type: 'string', + description: 'Additional comment about the outgoing comm.', + }, }, }, }, @@ -1467,6 +1471,11 @@ export const schemaDict = { type: 'string', format: 'did', }, + comment: { + type: 'string', + description: + "Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers", + }, }, }, }, diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/defs.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/defs.ts index 27f080cbe31..33a4ccd1b9a 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/defs.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/defs.ts @@ -674,6 +674,8 @@ export function validateModEventUnmute(v: unknown): ValidationResult { export interface ModEventEmail { /** The subject line of the email sent to the user. */ subjectLine: string + /** Additional comment about the outgoing comm. */ + comment?: string [k: string]: unknown } diff --git a/packages/bsky/src/lexicon/types/com/atproto/admin/sendEmail.ts b/packages/bsky/src/lexicon/types/com/atproto/admin/sendEmail.ts index 91b53d9be81..f94cfb3a083 100644 --- a/packages/bsky/src/lexicon/types/com/atproto/admin/sendEmail.ts +++ b/packages/bsky/src/lexicon/types/com/atproto/admin/sendEmail.ts @@ -15,6 +15,8 @@ export interface InputSchema { content: string subject?: string senderDid: string + /** Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers */ + comment?: string [k: string]: unknown } diff --git a/packages/pds/src/api/com/atproto/admin/sendEmail.ts b/packages/pds/src/api/com/atproto/admin/sendEmail.ts index 6be104e8a02..c632e87ce59 100644 --- a/packages/pds/src/api/com/atproto/admin/sendEmail.ts +++ b/packages/pds/src/api/com/atproto/admin/sendEmail.ts @@ -16,6 +16,7 @@ export default function (server: Server, ctx: AppContext) { recipientDid, senderDid, subject = 'Message from Bluesky moderator', + comment, } = input.body const account = await ctx.accountManager.getAccount(recipientDid) if (!account) { @@ -44,6 +45,7 @@ export default function (server: Server, ctx: AppContext) { event: { $type: 'com.atproto.admin.defs#modEventEmail', subjectLine: subject, + comment, }, subject: { $type: 'com.atproto.admin.defs#repoRef', diff --git a/packages/pds/src/lexicon/lexicons.ts b/packages/pds/src/lexicon/lexicons.ts index 51f3a9f5456..55de861d600 100644 --- a/packages/pds/src/lexicon/lexicons.ts +++ b/packages/pds/src/lexicon/lexicons.ts @@ -816,6 +816,10 @@ export const schemaDict = { type: 'string', description: 'The subject line of the email sent to the user.', }, + comment: { + type: 'string', + description: 'Additional comment about the outgoing comm.', + }, }, }, }, @@ -1467,6 +1471,11 @@ export const schemaDict = { type: 'string', format: 'did', }, + comment: { + type: 'string', + description: + "Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers", + }, }, }, }, diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/defs.ts b/packages/pds/src/lexicon/types/com/atproto/admin/defs.ts index 27f080cbe31..33a4ccd1b9a 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/defs.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/defs.ts @@ -674,6 +674,8 @@ export function validateModEventUnmute(v: unknown): ValidationResult { export interface ModEventEmail { /** The subject line of the email sent to the user. */ subjectLine: string + /** Additional comment about the outgoing comm. */ + comment?: string [k: string]: unknown } diff --git a/packages/pds/src/lexicon/types/com/atproto/admin/sendEmail.ts b/packages/pds/src/lexicon/types/com/atproto/admin/sendEmail.ts index 91b53d9be81..f94cfb3a083 100644 --- a/packages/pds/src/lexicon/types/com/atproto/admin/sendEmail.ts +++ b/packages/pds/src/lexicon/types/com/atproto/admin/sendEmail.ts @@ -15,6 +15,8 @@ export interface InputSchema { content: string subject?: string senderDid: string + /** Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers */ + comment?: string [k: string]: unknown }