Commit Graph

843 Commits

Author SHA1 Message Date
Devin Ivy ea9d96e3a4 v0.6.4 2023-08-15 17:12:30 -04:00
Foysal Ahamed 7bc701e2e1 Allow creating moderation action with a duration (#1431)
*  Add action duration to action model

*  Add periodic moderation action reversal

*  Use actionDurationInHours and remove takedownExpiresAt

*  Destroy mod action reversal job

*  Add test for automatic moderation action reversal

* 🧹 Port over actionDuration to bsky package

* ♻️ Better naming for action duration and minor fixes

* ♻️ Optionally build expiresAt based on createdAt when logging action

* ♻️ Adjust constructor params

*  Copy over migration from pds to bsky package

* 🚨 Fix indentation

*  Propagate action reversal from app-view to pds

*  Revert locally only if pushAgent is not found

* build

* merge dbcoordinator work into periodic mod actions

* fix entrypoint for periodic mod reversals

* do not run periodic reversals on sequencer leader

* fix duration in action detail on bsky

* update env for pushing mod reversals

* allow zero-duration actions for testing

* remove build

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-08-15 15:44:53 -04:00
Eric Bailey 23d6feb3c9 add method to bsky agent 2023-08-15 13:58:40 -05:00
Eric Bailey b05986f7d1 codegen 2023-08-14 15:39:48 -05:00
Paul Frazee 9a824aeae6 @atproto/api@0.6.3 2023-08-10 15:37:50 -07:00
Daniel Holmgren 244bf46e74 Include limited info on blocked embeds (#1463)
* add block info to embeds

* fix codegen

* Correctly handle blocked embeds and add block-other cause

* update snaps

* Correctly identify blocking behavior in embeds

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2023-08-10 15:54:24 -05:00
Paul Frazee 29a1ee791a @atproto/api@0.6.2 2023-08-10 12:53:35 -07:00
Daniel Holmgren ba979b4cdb Include limited viewer info on blocked post (#1457)
* include limited viewer info on block

* blockedAuthor schema

* make author required

* merge & update codegen

* patch up tests
2023-08-10 14:31:45 -05:00
Daniel Holmgren 3f0e1b2563 Read after write (#1398)
* first pass on profiles

* quick test

* wip

* wip

* test post thread

* record embeds

* get author feed profiles

* wip timeline

* fix get timeline

* switch from counter to tid

* tidy into a service

* quick tid test

* pr feedback

* clock -> rev

* update image formatting

* disable migration & build branch

* add recent posts to getAuthorFeed & handle post thread not found errors

* refactor for lag header

* tidy

* rm collections check

* tidy test

* pr feedback

* fix small bug

* build branch

* get migrations into system

* enable migrations
2023-08-10 13:42:31 -05:00
Paul Frazee b406a45829 @atproto/api@0.6.0 2023-08-09 16:08:05 -07:00
Paul Frazee ab50816461 Self-labeling (#1444)
* Add self-label schemas

* switch around array and union for self-labels

* apply self-labels to post and profile views

* test for self labels in pds

* apply self-labels to post and profile views in bsky appview

* test for self labels in bsky appview

* update pds proxied test snapshots

* Add support for self-labels to the mdoeration sdk

* Disable unknown-labeler filtering until 3P support is added

---------

Co-authored-by: Devin Ivy <devinivy@gmail.com>
2023-08-09 19:06:29 -04:00
Eric Bailey ef23263297 Merge pull request #1439 from bluesky-social/eric/app-787-media-tab
add filter param to getAuthorFeed
2023-08-09 15:38:09 -05:00
Paul Frazee 0f2c006641 @atproto/api@0.5.4 2023-08-08 16:22:54 -07:00
Paul Frazee 6dbf4c67bc @atproto/api@0.5.3 2023-08-08 16:18:38 -07:00
Paul Frazee f9cce06c23 Tune moderation downgrading on self-content to carry over blurring behaviors in some cases (#1453)
* Tune moderation downgrading on self-content to carry over blurring behaviors in some cases

* Fixes
2023-08-08 16:18:03 -07:00
Eric Bailey 55f33234e2 fix naming 2023-08-08 16:40:55 -05:00
Eric Bailey 92f5979d44 update naming based on feedback 2023-08-08 15:41:48 -05:00
Eric Bailey 5083705a37 use more specific naming 2023-08-08 12:20:08 -05:00
Eric Bailey 59c435648d codegen again 2023-08-08 12:02:34 -05:00
Eric Bailey 7f84fb215e codegen 2023-08-08 12:02:34 -05:00
Paul Frazee 43bb6ae147 @atproto/api@0.5.2 2023-08-03 21:54:38 -07:00
Paul Frazee 82ada3d27a Moderation API fixes - QP blurs & label names (#1435)
* Fix: blur quote posts with the blur-media label type

* Switch to label titles that are less stilted
2023-08-03 21:54:06 -07:00
dholms ce5a43067d v0.5.1 2023-08-03 12:56:30 -05:00
Paul Frazee 749db2e425 @atproto/api@0.5.0 2023-08-03 10:29:54 -07:00
Paul Frazee b30f847d09 Labeling & moderation updates to SDK (#1366)
* First pass on label definitions and reference-doc generation for them

* Tune labels

* Drop the 'csam' label in favor of using !hide

CSAM is an extremely delicate issue. Moderators must be careful to
remove it from the system without calling direct attention to it.
Using the generic !hide achieves the same effect while obscuring
the reason for the removal. Server and AppView bans will then be
employed (along with any other needed mechanisms) to strip the
content from the network.

There is also a 'false accusation' concern with using the csam
label. Fingerprinting techniques and AI are used to scan for csam.
These are capable of producing false positives which will then be
reverted after human review. The reputational damage caused by a
false positive could be severe, so we want to be careful about any
system which might publicize a false positive.

* Add label definition code generation

* Implement all type signatures for moderation

* Complete a first pass on the labeling sdk

* Add post-moderation test suite

* Add post moderation behavior documentation

* Add self-post behaviors

* Improve post moderation doc

* Tune up the post moderation doc

* Tune up the post moderation doc

* Tune up the post moderation doc

* Simplify the post moderation behavior descriptions

* More behavior description tuneup

* Add profile moderation final behaviors and tests

* Improve generated post-moderation-behaviors doc

* Add profile moderation behaviors doc

* Test muted-by-list specifically

* Fixes to label descriptions

* Fix to muted-by-list behavior

* Dont blur account in moderateProfile() when muting

* Tune label copy

* Apply post embed blurring when account is marked with blurmedia label

* Fix output signature

* Fixes to blocking behavior

* Rename LabelDefinitionPreference to LabelPreference

* Update docs

* Fix test

* Fix: self-harm should blur media only

* Fixes to tests

* Improve label copy

* Remove all labels that do not have a specific policy

Communicating moderation policies with active users is important.
This PR originally included labels which were proposed but did not
yet have policies. While we didn't intend to use them until a
policy was established, I decided it's better to hold off putting
them in the code until we're sure about them. They can be found in
backup files prefixed with "proposed-".
2023-08-03 10:28:06 -07:00
devin ivy e5e24d510e Push labels to PDS (#1423)
* add lexicon for unspecced applyLabels procedure

* implement label push to pds via unspecced.applyLabels

* add hive retry to bsky appview

* build

* update applyLabels to work with raw label data

* update bsky hive labeler

* remove build
2023-08-03 12:25:56 -04:00
dholms 2cbc4c31a5 v0.4.4 2023-08-01 17:57:14 -05:00
Foysal Ahamed 13b16b33f2 Allow setting a note when enabling/disabling invite codes (#1363)
* Allow setting a note when enabling/disabling invite codes

* Add inviteNote to repoView

*  Add test for inviteNote

*  Set to null when note is empty

*  Change note from text to varchar

* 📝 Better description
2023-08-01 17:43:21 -05:00
dholms 354e05225b v0.4.3 2023-07-20 12:35:42 -05:00
Eric Bailey b2ef3865bc Merge pull request #1365 from bluesky-social/eric/search-getPopularFeedGenerators
add optional `ILIKE` query to `getPopularFeedGenerators`
2023-07-20 11:00:51 -05:00
Eric Bailey 64137c7e5c add optional ilike query to getPopularFeedGenerators 2023-07-19 17:25:49 -05:00
Devin Ivy 754ad7f4f9 v0.4.2 2023-07-17 19:10:42 -04:00
Foysal Ahamed 775944e84a Added new procedure for sending admin email (#1312)
* 🚧 Added new lexicon for sending admin email

*  Add moderation mailer

*  Switch to text email content from html

* 🧹 Cleanup some early implementation code and reflect PR reivew

*  Use smtp host instead of gmail service config

*  Move to using single smtp url
2023-07-17 19:06:44 -04:00
Devin Ivy 670daf5edd v0.4.1 2023-07-15 10:32:45 -07:00
Foysal Ahamed b9ca76f012 Allow searching reports by moderator did (#1283)
*  Allow searching reports by moderator did

*  Remove .only flags on tests

*  Update snapshot

*  Add checks for did match in actions
2023-07-14 16:05:56 -07:00
Ansh 08dc2b725d Pagination on getPopularFeedGenerators (#1293)
* add temporary page-based pagination

* use cursor & limit for pagination

* tests

* add to appview

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2023-07-07 13:49:02 -05:00
Daniel Holmgren 7e0201d4d6 Bump package versions (#1288)
* v0.3.0

* bump common-web to 0.2.0

* v0.2.0

* v0.2.0

* v0.1.0

* v0.1.0

* v0.1.0

* v0.2.0

* v0.4.0

* v0.1.0

* v0.2.0

* v0.2.0

* v0.3.0

* v0.2.0
2023-07-05 20:54:26 -05:00
Daniel Holmgren e7a0d27f1f Proxy timeline skeleton construction (#1264)
proxy timeline skeleton construction to appview
2023-07-03 11:28:39 -05:00
Devin Ivy e522ece8f3 v0.3.13 2023-06-23 16:41:27 -04:00
Ansh 0306f81d37 Add ability to embed lists (#1188)
* add cid to ListView and ListViewBasic

* add test for mute list embed

* add support for list embeds views

* test

* port to appview

* update missing snap

---------

Co-authored-by: dholms <dtholmgren@gmail.com>
2023-06-23 16:30:52 -04:00
devin ivy 3da0324873 Post record language tagging, lexicon language format (#1219)
* Add languages field to post record

* helper for parsing bcp47

* add language format to lexicon

* codegen for post record langs field

* re-export language parsing in api package

* tests and tidy for lexicon language format

* index post langs, in-progress

* update snapshots, fixes record-with-media embed issue

* index post langs on bsky appview

* don't bother indexing post langs in pds appview, tidy
2023-06-23 16:23:16 -04:00
Daniel Holmgren 2768fb9e45 Make requestCrawl & notifyOfUpdate procedures (#1217)
make requestCrawl & notifyOfUpdate procedures
2023-06-20 09:36:09 -05:00
devin ivy 84032a6c77 Bsky appview: resolve long transactions, tombstone behavior (#1192)
* Loosen indexing txn boundaries to record-level in bsky appview, no long transactions

* Add explicit HeadNotFound error to sync.getHead

* Update tombstone behavior on bsky appview, use more specific error on sync.getHead
2023-06-12 17:51:38 -04:00
devin ivy 5951d9347f Misc. syncing-up bsky appview with on-pds appview (pt. 2) (#1190)
* Misc notification and optimization in bsky, tidy

* Handle notifs on message queue in bsky appview

* Sync-up profile labeling behavior in bsky

* No async work during actor unindexing in bsky, include additional indexes

* Prevent deeply nested notifs w/ hellthread exception in bsky appview

* Add indexes to bsky appview for more efficient actor deletion/unindexing

* Update pds proxy snaps for updated bsky profile labeling

* Return custom suggestions in bsky appview

* Test out-of-order indexing of aggregations on bsky appview

* Proxy pds getPopular to hot-classic feed on appview. Proxy getPopularFeedGenerators to appview.

* Make did field required on feedgen view
2023-06-11 15:48:20 -04:00
Devin Ivy 1033eddc00 v0.3.12 2023-06-09 09:28:32 -04:00
Foysal Ahamed 8857fb0845 Filter reports by reporter did (#1165)
*  Hydrate subject author's repo in moderation reports

*  Allow filtering moderation reports by reporter DIDs

* 🚧 Expose only handle of the subject repo on moderation reports

* 🚧 Regenerate lexicons off main

* 🧹 Cleanup unnecessary joins

*  Updating snapshots

*  Make handle optional to allow serving reports even if handle doesn't exist

*  Port over subjectHandle implementation to bsky package

*  Port over filter by reporter implementation to bsky package

* Simplify query builder

Co-authored-by: devin ivy <devinivy@gmail.com>

* Simplify query builder

Co-authored-by: devin ivy <devinivy@gmail.com>

---------

Co-authored-by: devin ivy <devinivy@gmail.com>
2023-06-09 09:21:09 -04:00
Devin Ivy 5eb777c3f2 v0.3.11 2023-06-08 10:32:52 -04:00
Foysal Ahamed 9a2dc7119e Hydrate subject author's repo in moderation reports (#1135)
*  Hydrate subject author's repo in moderation reports

* 🚧 Expose only handle of the subject repo on moderation reports

* 🚧 Regenerate lexicons off main

* 🧹 Cleanup unnecessary joins

*  Updating snapshots

*  Make handle optional to allow serving reports even if handle doesn't exist

*  Port over subjectHandle implementation to bsky package
2023-06-08 10:17:52 -04:00
Daniel Holmgren 6fb9a8faea Fix dropped events in sync.subscribeRepos (#1167)
* wip

* first pass done

* chnage around how channels function

* bugfixing

* fix up migration & tests

* fix dev-env

* add prep migration for stream fixing

* application code changes to use new repo_event table

* dont send evts

* add outgoing_repo_seq table + sqlite migrations

* patch up down migration

* patching up a couple things

* update test

* patchup

* re-enable subscription route

* add outgoingSeq column

* updating

* accidental add

* temporarily disable stream

* resolve merge conflict

* add migration

* migration for seq

* fix test

* id -> seq

* get schema lock ids

* tidy

* fix server test

* fix up

* use bsky uniqueLockId approach

* tidy

* gh actions build

* build branch

* build branch

* tweak test

* rm constraint rename

* small bugfix

* check for seq not null

* fix up issues

* one more small change

* tidy

* no build branches
2023-06-06 19:18:44 -05:00
Devin Ivy 85765852b5 v0.3.10 2023-05-30 12:18:36 -04:00