Foysal Ahamed c559e7e3de
Add subject tags with report type (#3260)
*  Add subject tags with report type

*  Update snapshots

*  Update snpshot for pds admin

*  Update ozone snapshot

*  Update ozone snapshot

* 🧹 Cleanup
2024-12-18 22:57:27 +00:00

454 lines
12 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`proxies admin requests creates reports of a repo. 1`] = `
Array [
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"id": 1,
"reasonType": "com.atproto.moderation.defs#reasonSpam",
"reportedBy": "user(0)",
"subject": Object {
"$type": "com.atproto.admin.defs#repoRef",
"did": "user(1)",
},
},
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"id": 3,
"reason": "impersonation",
"reasonType": "com.atproto.moderation.defs#reasonOther",
"reportedBy": "user(2)",
"subject": Object {
"$type": "com.atproto.admin.defs#repoRef",
"did": "user(1)",
},
},
]
`;
exports[`proxies admin requests fetches a list of events. 1`] = `
Array [
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "user(1)",
"creatorHandle": "testmod.test",
"event": Object {
"$type": "tools.ozone.moderation.defs#modEventAcknowledge",
},
"id": 7,
"subject": Object {
"$type": "com.atproto.admin.defs#repoRef",
"did": "user(0)",
},
"subjectBlobCids": Array [],
"subjectHandle": "bob.test",
},
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "user(2)",
"creatorHandle": "mod-authority.test",
"event": Object {
"$type": "tools.ozone.moderation.defs#modEventTag",
"add": Array [
"report:other",
],
"remove": Array [],
},
"id": 4,
"subject": Object {
"$type": "com.atproto.admin.defs#repoRef",
"did": "user(0)",
},
"subjectBlobCids": Array [],
"subjectHandle": "bob.test",
},
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "user(3)",
"creatorHandle": "carol.test",
"event": Object {
"$type": "tools.ozone.moderation.defs#modEventReport",
"comment": "impersonation",
"isReporterMuted": false,
"reportType": "com.atproto.moderation.defs#reasonOther",
},
"id": 3,
"subject": Object {
"$type": "com.atproto.admin.defs#repoRef",
"did": "user(0)",
},
"subjectBlobCids": Array [],
"subjectHandle": "bob.test",
},
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "user(2)",
"creatorHandle": "mod-authority.test",
"event": Object {
"$type": "tools.ozone.moderation.defs#modEventTag",
"add": Array [
"report:spam",
"lang:en",
"lang:i",
],
"remove": Array [],
},
"id": 2,
"subject": Object {
"$type": "com.atproto.admin.defs#repoRef",
"did": "user(0)",
},
"subjectBlobCids": Array [],
"subjectHandle": "bob.test",
},
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "user(4)",
"creatorHandle": "alice.test",
"event": Object {
"$type": "tools.ozone.moderation.defs#modEventReport",
"isReporterMuted": false,
"reportType": "com.atproto.moderation.defs#reasonSpam",
},
"id": 1,
"subject": Object {
"$type": "com.atproto.admin.defs#repoRef",
"did": "user(0)",
},
"subjectBlobCids": Array [],
"subjectHandle": "bob.test",
},
]
`;
exports[`proxies admin requests fetches event details. 1`] = `
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "user(2)",
"event": Object {
"$type": "tools.ozone.moderation.defs#modEventTag",
"add": Array [
"report:spam",
"lang:en",
"lang:i",
],
"remove": Array [],
},
"id": 2,
"subject": Object {
"$type": "com.atproto.admin.defs#repoView",
"did": "user(0)",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"moderation": Object {
"subjectStatus": Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"hosting": Object {
"$type": "tools.ozone.moderation.defs#accountHosting",
"status": "unknown",
},
"id": 1,
"lastReportedAt": "1970-01-01T00:00:00.000Z",
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
"lastReviewedBy": "user(1)",
"reviewState": "tools.ozone.moderation.defs#reviewClosed",
"subject": Object {
"$type": "com.atproto.admin.defs#repoRef",
"did": "user(0)",
},
"subjectBlobCids": Array [],
"subjectRepoHandle": "bob.test",
"tags": Array [
"report:spam",
"lang:en",
"lang:i",
"report:other",
],
"takendown": false,
"updatedAt": "1970-01-01T00:00:00.000Z",
},
},
"relatedRecords": Array [
Object {
"$type": "app.bsky.actor.profile",
"avatar": Object {
"$type": "blob",
"mimeType": "image/jpeg",
"ref": Object {
"$link": "cids(0)",
},
"size": 3976,
},
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"displayName": "bobby",
},
],
},
"subjectBlobCids": Array [],
"subjectBlobs": Array [],
}
`;
exports[`proxies admin requests fetches moderation events. 1`] = `
Array [
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "user(0)",
"creatorHandle": "mod-authority.test",
"event": Object {
"$type": "tools.ozone.moderation.defs#modEventTag",
"add": Array [
"lang:en",
],
"remove": Array [],
},
"id": 6,
"subject": Object {
"$type": "com.atproto.repo.strongRef",
"cid": "cids(0)",
"uri": "record(0)",
},
"subjectBlobCids": Array [],
"subjectHandle": "bob.test",
},
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "user(1)",
"creatorHandle": "testmod.test",
"event": Object {
"$type": "tools.ozone.moderation.defs#modEventAcknowledge",
},
"id": 5,
"subject": Object {
"$type": "com.atproto.repo.strongRef",
"cid": "cids(0)",
"uri": "record(0)",
},
"subjectBlobCids": Array [],
"subjectHandle": "bob.test",
},
]
`;
exports[`proxies admin requests fetches record details. 1`] = `
Object {
"blobCids": Array [],
"blobs": Array [],
"cid": "cids(0)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"moderation": Object {
"subjectStatus": Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"hosting": Object {
"$type": "tools.ozone.moderation.defs#recordHosting",
"status": "unknown",
},
"id": 5,
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
"lastReviewedBy": "user(1)",
"reviewState": "tools.ozone.moderation.defs#reviewClosed",
"subject": Object {
"$type": "com.atproto.repo.strongRef",
"cid": "cids(0)",
"uri": "record(0)",
},
"subjectBlobCids": Array [],
"subjectRepoHandle": "bob.test",
"tags": Array [
"lang:en",
],
"takendown": false,
"updatedAt": "1970-01-01T00:00:00.000Z",
},
},
"repo": Object {
"did": "user(0)",
"email": "bob@test.com",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"invitedBy": Object {
"available": 10,
"code": "invite-code",
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "admin",
"disabled": false,
"forAccount": "admin",
"uses": Array [
Object {
"usedAt": "1970-01-01T00:00:00.000Z",
"usedBy": "user(1)",
},
Object {
"usedAt": "1970-01-01T00:00:00.000Z",
"usedBy": "user(2)",
},
Object {
"usedAt": "1970-01-01T00:00:00.000Z",
"usedBy": "user(3)",
},
Object {
"usedAt": "1970-01-01T00:00:00.000Z",
"usedBy": "user(0)",
},
Object {
"usedAt": "1970-01-01T00:00:00.000Z",
"usedBy": "user(4)",
},
],
},
"invitesDisabled": true,
"moderation": Object {
"subjectStatus": Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"hosting": Object {
"$type": "tools.ozone.moderation.defs#accountHosting",
"status": "unknown",
},
"id": 1,
"lastReportedAt": "1970-01-01T00:00:00.000Z",
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
"lastReviewedBy": "user(1)",
"reviewState": "tools.ozone.moderation.defs#reviewClosed",
"subject": Object {
"$type": "com.atproto.admin.defs#repoRef",
"did": "user(0)",
},
"subjectBlobCids": Array [],
"subjectRepoHandle": "bob.test",
"tags": Array [
"report:spam",
"lang:en",
"lang:i",
"report:other",
],
"takendown": false,
"updatedAt": "1970-01-01T00:00:00.000Z",
},
},
"relatedRecords": Array [
Object {
"$type": "app.bsky.actor.profile",
"avatar": Object {
"$type": "blob",
"mimeType": "image/jpeg",
"ref": Object {
"$link": "cids(1)",
},
"size": 3976,
},
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"displayName": "bobby",
},
],
},
"uri": "record(0)",
"value": Object {
"$type": "app.bsky.feed.post",
"createdAt": "1970-01-01T00:00:00.000+00:00",
"text": "bobby boy here",
},
}
`;
exports[`proxies admin requests fetches repo details. 1`] = `
Object {
"did": "user(0)",
"email": "eve@test.com",
"handle": "eve.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"invitedBy": Object {
"available": 1,
"code": "invite-code",
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "admin",
"disabled": false,
"forAccount": "user(1)",
"uses": Array [
Object {
"usedAt": "1970-01-01T00:00:00.000Z",
"usedBy": "user(0)",
},
],
},
"invites": Array [],
"invitesDisabled": false,
"labels": Array [],
"moderation": Object {},
"relatedRecords": Array [],
}
`;
exports[`proxies admin requests searches repos. 1`] = `
Array [
Object {
"did": "user(0)",
"handle": "alice.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"moderation": Object {},
"relatedRecords": Array [
Object {
"$type": "app.bsky.actor.profile",
"avatar": Object {
"$type": "blob",
"mimeType": "image/jpeg",
"ref": Object {
"$link": "cids(0)",
},
"size": 3976,
},
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "its me!",
"displayName": "ali",
"labels": Object {
"$type": "com.atproto.label.defs#selfLabels",
"values": Array [
Object {
"val": "self-label-a",
},
Object {
"val": "self-label-b",
},
],
},
},
],
},
]
`;
exports[`proxies admin requests takes actions and resolves reports 1`] = `
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "user(0)",
"event": Object {
"$type": "tools.ozone.moderation.defs#modEventAcknowledge",
},
"id": 5,
"subject": Object {
"$type": "com.atproto.repo.strongRef",
"cid": "cids(0)",
"uri": "record(0)",
},
"subjectBlobCids": Array [],
}
`;
exports[`proxies admin requests takes actions and resolves reports 2`] = `
Object {
"createdAt": "1970-01-01T00:00:00.000Z",
"createdBy": "user(1)",
"event": Object {
"$type": "tools.ozone.moderation.defs#modEventAcknowledge",
},
"id": 7,
"subject": Object {
"$type": "com.atproto.admin.defs#repoRef",
"did": "user(0)",
},
"subjectBlobCids": Array [],
}
`;