Skip to content

Commit

Permalink
Remove profile labels (#866)
Browse files Browse the repository at this point in the history
* moderation tweks

* fix: typo. (#818)

* Create invite codes for many accounts (#825)

* create invite codes for many accounts

* test

* Revamp dev env (#796)

* fix up a couple of tsc errors in app view merge

* wip

* use dev-env for appview tests

* process all in blob resolver

* another test fix

* fixed missed merge conflict

* fix one more merge conflict

* fix popular test

* Sync test env with labeler changes (#836)

fix test-env

* Remove extraneous info on getRecord (#835)

* remove extraneous info on getRecord

* fix test-env

* Fix duplication of constants in the crypto package (#819)

* App passwords (#826)

* app password lex & auth chnages

* scrypt things

* implemented app password refresh tokens

* db tidy & migration

* revocation + bugfixin

* tests, listing passwords & cleanup

* Update packages/pds/src/db/scrypt.ts

Co-authored-by: devin ivy <[email protected]>

* Update packages/pds/src/db/scrypt.ts

Co-authored-by: devin ivy <[email protected]>

* pr feedback

---------

Co-authored-by: devin ivy <[email protected]>

* remove profile labels

* rm temp branch from workflow

---------

Co-authored-by: Devin Ivy <[email protected]>
Co-authored-by: S. Ota <[email protected]>
Co-authored-by: Ilya Siamionau <[email protected]>
  • Loading branch information
4 people authored Apr 23, 2023
1 parent d86cf03 commit 2b5347b
Show file tree
Hide file tree
Showing 11 changed files with 520 additions and 1,149 deletions.
4 changes: 0 additions & 4 deletions packages/pds/src/labeler/hive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export const respToClasses = (res: HiveResp): HiveRespClass[] => {

// sexual: https://docs.thehive.ai/docs/sexual-content
// gore and violence: https://docs.thehive.ai/docs/class-descriptions-violence-gore
// iconography: https://docs.thehive.ai/docs/class-descriptions-hate-bullying
const labelForClass = {
yes_sexual_activity: 'porn',
animal_genitalia_and_human: 'porn', // for some reason not included in 'yes_sexual_activity'
Expand All @@ -85,9 +84,6 @@ const labelForClass = {
very_bloody: 'gore',
human_corpse: 'corpse',
yes_self_harm: 'self-harm',
yes_nazi: 'icon-nazi',
yes_kkk: 'icon-kkk',
yes_confederate: 'icon-confederate',
}

export const summarizeLabels = (classes: HiveRespClass[]): string[] => {
Expand Down
5 changes: 3 additions & 2 deletions packages/pds/src/labeler/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ type RecordFields = {
export const getFieldsFromRecord = (record: unknown): RecordFields => {
if (isPost(record)) {
return getFieldsFromPost(record)
} else if (isProfile(record)) {
return getFieldsFromProfile(record)
// @TODO add back in profile labeling
// } else if (isProfile(record)) {
// return getFieldsFromProfile(record)
} else {
return { text: [], imgs: [] }
}
Expand Down
135 changes: 36 additions & 99 deletions packages/pds/tests/event-stream/__snapshots__/sync.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,7 @@ Array [
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"labels": Array [
Object {
"cid": "cids(6)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(9)",
"val": "test-label",
},
],
"labels": Array [],
"viewer": Object {
"followedBy": "record(8)",
"following": "record(7)",
Expand Down Expand Up @@ -245,7 +236,7 @@ Array [
"muted": false,
},
},
"cid": "cids(7)",
"cid": "cids(6)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"likeCount": 0,
Expand All @@ -254,8 +245,8 @@ Array [
"createdAt": "1970-01-01T00:00:00.000Z",
"reply": Object {
"parent": Object {
"cid": "cids(8)",
"uri": "record(11)",
"cid": "cids(7)",
"uri": "record(10)",
},
"root": Object {
"cid": "cids(0)",
Expand All @@ -266,7 +257,7 @@ Array [
},
"replyCount": 0,
"repostCount": 0,
"uri": "record(10)",
"uri": "record(9)",
"viewer": Object {},
},
"reply": Object {
Expand All @@ -276,23 +267,14 @@ Array [
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"labels": Array [
Object {
"cid": "cids(6)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(9)",
"val": "test-label",
},
],
"labels": Array [],
"viewer": Object {
"followedBy": "record(8)",
"following": "record(7)",
"muted": false,
},
},
"cid": "cids(8)",
"cid": "cids(7)",
"embed": Object {
"$type": "app.bsky.embed.images#view",
"images": Array [
Expand All @@ -306,19 +288,19 @@ Array [
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(8)",
"cid": "cids(7)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(11)",
"uri": "record(10)",
"val": "test-label",
},
Object {
"cid": "cids(8)",
"cid": "cids(7)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(11)",
"uri": "record(10)",
"val": "test-label-2",
},
],
Expand Down Expand Up @@ -356,7 +338,7 @@ Array [
},
"replyCount": 1,
"repostCount": 0,
"uri": "record(11)",
"uri": "record(10)",
"viewer": Object {},
},
"root": Object {
Expand Down Expand Up @@ -398,7 +380,7 @@ Array [
"muted": false,
},
},
"cid": "cids(9)",
"cid": "cids(8)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"likeCount": 0,
Expand All @@ -419,7 +401,7 @@ Array [
},
"replyCount": 0,
"repostCount": 0,
"uri": "record(12)",
"uri": "record(11)",
"viewer": Object {},
},
"reply": Object {
Expand Down Expand Up @@ -482,23 +464,14 @@ Array [
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"labels": Array [
Object {
"cid": "cids(6)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(9)",
"val": "test-label",
},
],
"labels": Array [],
"viewer": Object {
"followedBy": "record(8)",
"following": "record(7)",
"muted": false,
},
},
"cid": "cids(8)",
"cid": "cids(7)",
"embed": Object {
"$type": "app.bsky.embed.images#view",
"images": Array [
Expand All @@ -512,19 +485,19 @@ Array [
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(8)",
"cid": "cids(7)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(11)",
"uri": "record(10)",
"val": "test-label",
},
Object {
"cid": "cids(8)",
"cid": "cids(7)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(11)",
"uri": "record(10)",
"val": "test-label-2",
},
],
Expand Down Expand Up @@ -562,7 +535,7 @@ Array [
},
"replyCount": 1,
"repostCount": 0,
"uri": "record(11)",
"uri": "record(10)",
"viewer": Object {},
},
"reply": Object {
Expand Down Expand Up @@ -630,7 +603,7 @@ Array [
"muted": false,
},
},
"cid": "cids(10)",
"cid": "cids(9)",
"embed": Object {
"$type": "app.bsky.embed.record#view",
"record": Object {
Expand Down Expand Up @@ -748,11 +721,11 @@ Array [
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(10)",
"cid": "cids(9)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(13)",
"uri": "record(12)",
"val": "test-label",
},
],
Expand All @@ -771,7 +744,7 @@ Array [
},
"replyCount": 0,
"repostCount": 0,
"uri": "record(13)",
"uri": "record(12)",
"viewer": Object {},
},
},
Expand All @@ -782,23 +755,14 @@ Array [
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"labels": Array [
Object {
"cid": "cids(6)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(9)",
"val": "test-label",
},
],
"labels": Array [],
"viewer": Object {
"followedBy": "record(8)",
"following": "record(7)",
"muted": false,
},
},
"cid": "cids(11)",
"cid": "cids(10)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"likeCount": 0,
Expand All @@ -809,7 +773,7 @@ Array [
},
"replyCount": 0,
"repostCount": 0,
"uri": "record(14)",
"uri": "record(13)",
"viewer": Object {},
},
},
Expand Down Expand Up @@ -901,16 +865,7 @@ Array [
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"labels": Array [
Object {
"cid": "cids(6)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(9)",
"val": "test-label",
},
],
"labels": Array [],
"viewer": Object {
"followedBy": "record(8)",
"following": "record(7)",
Expand Down Expand Up @@ -1028,7 +983,7 @@ Array [
"muted": false,
},
},
"cid": "cids(12)",
"cid": "cids(11)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"likeCount": 0,
Expand All @@ -1039,7 +994,7 @@ Array [
},
"replyCount": 0,
"repostCount": 0,
"uri": "record(15)",
"uri": "record(14)",
"viewer": Object {},
},
},
Expand Down Expand Up @@ -1081,16 +1036,7 @@ Array [
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"labels": Array [
Object {
"cid": "cids(6)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(9)",
"val": "test-label",
},
],
"labels": Array [],
"viewer": Object {
"followedBy": "record(8)",
"following": "record(7)",
Expand Down Expand Up @@ -1157,7 +1103,7 @@ Array [
"repostCount": 0,
"uri": "record(3)",
"viewer": Object {
"like": "record(16)",
"like": "record(15)",
},
},
},
Expand All @@ -1168,16 +1114,7 @@ Array [
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"labels": Array [
Object {
"cid": "cids(6)",
"cts": "1970-01-01T00:00:00.000Z",
"neg": false,
"src": "did:example:labeler",
"uri": "record(9)",
"val": "test-label",
},
],
"labels": Array [],
"viewer": Object {
"followedBy": "record(8)",
"following": "record(7)",
Expand Down Expand Up @@ -1211,7 +1148,7 @@ Array [
"muted": false,
},
},
"cid": "cids(13)",
"cid": "cids(12)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"likeCount": 0,
Expand All @@ -1222,7 +1159,7 @@ Array [
},
"replyCount": 0,
"repostCount": 0,
"uri": "record(17)",
"uri": "record(16)",
"viewer": Object {},
},
},
Expand Down
Loading

0 comments on commit 2b5347b

Please sign in to comment.