summaryrefslogtreecommitdiff
path: root/internal/api/client
AgeCommit message (Collapse)AuthorFiles
2024-03-07[docs/chore] Swagger fixes for filters (#2730)Libravatar Vyr Cossont3
* Swagger: filtersV1Get should return an array * Swagger: context must use multi format
2024-03-06[bugfix] Fix Swagger spec and add test script (#2698)Libravatar Vyr Cossont18
* Add Swagger spec test script * Fix Swagger spec errors not related to statuses with polls * Add API tests that post a status with a poll * Fix creating a status with a poll from form params * Fix Swagger spec errors related to statuses with polls (this is the last error) * Fix Swagger spec warnings not related to unused definitions * Suppress a duplicate list update params definition that was somehow causing wrong param names * Add Swagger test to CI - updates Drone config - vendorizes go-swagger - fixes a file extension issue that caused the test script to generate JSON instead of YAML with the vendorized version * Put `Sample: ` on its own line everywhere * Remove unused id param from emojiCategoriesGet * Add 5 more pairs of profile fields to account update API Swagger * Remove Swagger prefix from dummy fields It makes the generated code look weird * Manually annotate params for statusCreate operation * Fix all remaining Swagger spec warnings - Change some models into operation parameters - Ignore models that already correspond to manually documented operation parameters but can't be trivially changed (those with file fields) * Documented that creating a status with scheduled_at isn't implemented yet * sign drone.yml * Fix filter API Swagger errors * fixup! Fix filter API Swagger errors --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-03-06[feature] Filters v1 (#2594)Libravatar Vyr Cossont13
* Implement client-side v1 filters * Exclude linter false positives * Update test/envparsing.sh * Fix minor Swagger, style, and Bun usage issues * Regenerate Swagger * De-generify filter keywords * Remove updating filter statuses This is an operation that the Mastodon v2 filter API doesn't actually have, because filter statuses, unlike keywords, don't have options: the only info they contain is the status ID to be filtered. * Add a test for filter statuses specifically * De-generify filter statuses * Inline FilterEntry * Use vertical style for Bun operations consistently * Add comment on Filter DB interface * Remove GoLand linter control comments Our existing linters should catch these, or they don't matter very much * Reduce memory ratio for filters
2024-02-29[bugfix] unwrap boosts when checking in-reply-to status (#2702)Libravatar kim1
* add stronger checks on status being replied to * update error code test is expecting
2024-02-27[feature] Add experimental `instance-federation-spam-filter` option (#2685)Libravatar tobi15
* [chore] Move `visibility` to `filter/visibility` * [feature] Add experimental instance-federation-spam-filter option
2024-02-23[chore] Increase default max image description to 1500 chars, collapse cw ↵Libravatar tobi1
char count into status (#2682) * [chore] Make default max image description 1500 chars, collapse cw char count into status * oops * tests
2024-02-20[bugfix] fix possible mutex lockup during streaming code (#2633)Libravatar kim1
* rewrite Stream{} to use much less mutex locking, update related code * use new context for the stream context * ensure stream gets closed on return of writeTo / readFrom WSConn() * ensure stream write timeout gets cancelled * remove embedded context type from Stream{}, reformat log messages for consistency * use c.Request.Context() for context passed into Stream().Open() * only return 1 boolean, fix tests to expect multiple stream types in messages * changes to ping logic * further improved ping logic * don't export unused function types, update message sending to only include relevant stream type * ensure stream gets closed :facepalm: * update to error log on failed json marshal (instead of panic) * inverse websocket read error checking to _ignore_ expected close errors
2024-02-20[feature] Add `requested_by` to relationship model (#2672)Libravatar tobi2
* [feature] Add `requested_by` to relationship model * whoops, missed some tests
2024-02-17[chore] Disable Move API endpoints for now until Move is fully implemented ↵Libravatar tobi2
in the backend (#2650) * [chore] Disable Move API endpoints for now until Move is fully implemented in the backend * disable other form fields * clarify that moving to GtS also isn't implemented yet
2024-01-29[bugfix] Fix Postgres emoji delete, emoji category change (#2570)Libravatar tobi5
* [bugfix] Fix Postgres emoji delete, emoji category change * revert trace logging * caching issue * update tests
2024-01-28[chore] Add a couple tests for updating list entries (#2580)Libravatar tobi2
2024-01-17[chore] update viper version (#2539)Libravatar kim2
* update viper version * removes our last uses of the slice package * fix tests
2024-01-16[feature] Account alias / move API + db models (#2518)Libravatar tobi3
* [feature] Account alias / move API + db models * go fmt * fix little cherry-pick issues * update error checking, formatting * add and use new util functions to simplify alias logic
2024-01-05[feature] Parse instance descriptors as markdown, show T&C on /about (#2481)Libravatar tobi1
* [feature] Parse instance descriptors as markdown, show T&C on /about * lint * remove unnecessary nullzero tags
2023-12-18[bugfix] :innocent: (#2476)Libravatar kim1
2023-12-18[feature] request blocking by http headers (#2409)Libravatar kim5
2023-12-10[bugfix] Ensure `pre` renders as expected, fix orderedCollectionPage (#2434)Libravatar tobi4
2023-12-09[bugfix] Fix web media not showing as sensitive (#2433)Libravatar tobi1
* [bugfix] Fix web media not showing as sensitive * test * go fmt
2023-11-28[chore]: Bump github.com/gorilla/websocket from 1.5.0 to 1.5.1 (#2335)Libravatar dependabot[bot]2
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kim <grufwub@gmail.com>
2023-11-27[feature] Add `/api/v1/admin/debug/apurl` endpoint (#2359)Libravatar tobi3
2023-11-27[performance] http response encoding / writing improvements (#2374)Libravatar kim80
2023-11-17[feature] Set/show instance language(s); show post language on frontend (#2362)Libravatar tobi1
* update go text, include text/display * [feature] Set instance langs, show post lang on frontend * go fmt * WebGet * set language for whole article, don't use FA icon * mention instance languages + other optional config vars * little tweak * put languages in config properly * warn log language parse * change some naming around * tidy up validate a bit * lint * rename LanguageTmpl in template
2023-11-14[bugfix] process account delete side effects in serial, not in parallel (#2360)Libravatar tobi15
* [bugfix] process account delete side effects in serial, not in parallel * StartWorkers / StartNoopWorkers for tests * undo testrig trace logging * log errors instead of immediately returning
2023-11-11[bugfix] support endless polls, and misskey's' method of inferring expiry in ↵Libravatar kim3
closed polls (#2349)
2023-11-10[feature] Media attachment placeholders (#2331)Libravatar tobi3
* [feature] Use placeholders for unknown media types * fix read of underreported small files * switch to reduce nesting * simplify cleanup
2023-11-10[chore/bugfix/horror] Allow `expires_in` and poll choices to be parsed from ↵Libravatar tobi11
strings (#2346)
2023-11-09[bugfix/docs] Poll api fixups + swagger docs (#2345)Libravatar tobi1
2023-11-08[feature] add support for polls + receiving federated status edits (#2330)Libravatar kim12
2023-10-30[bugfix] Allow blocked accounts to show in precise search (#2321)Libravatar tobi1
2023-10-25[feature] Status thread mute/unmute functionality (#2278)Libravatar tobi4
* add db models + functions for keeping track of threads * give em the old linty testy * create, remove, check mutes * swagger * testerino * test mute/unmute via api * add info log about new index creation * thread + allow muting of any remote statuses that mention a local account * IsStatusThreadMutedBy -> IsThreadMutedByAccount * use common processing functions in status processor * set = NULL * favee! * get rekt darlings, darlings get rekt * testrig please, have mercy muy liege
2023-10-23[chore] de-interface{} the federator and dereferencer structs (#2285)Libravatar kim14
* de-interface{} the federator and dereferencer structs * fix broken type signatures
2023-10-17[feature] Allow import/export/creation of domain allows via admin panel (#2264)v0.12.0-rc1Libravatar tobi1
* it's happening! * aaa * fix silly whoopsie * it's working pa! it's working ma! * model report parameters * shuffle some more stuff around * getting there * oo hoo * finish tidying up for now * aaa * fix use form submit errors * peepee poo poo * aaaaa * ffff * they see me typin', they hatin' * boop * aaa * oooo * typing typing tappa tappa * almost done typing * weee * alright * push it push it real good doo doo doo doo doo doo * thingy no worky * almost done * mutation modifers not quite right * hmm * it works * view blocks + allows nicely * it works! * typia install * the old linterino * linter plz
2023-10-04[docs] statuses-query-pinned #2250 (#2251)Libravatar 恐咖兵糖1
2023-10-04[feature] tentatively start adding polls support (#2249)Libravatar kim2
2023-09-23[chore] deinterface the typeutils.Converter and update to use state ↵Libravatar kim14
structure (#2217) * update typeconverter to use state structure * deinterface the typeutils.TypeConverter -> typeutils.Converter * finish copying over old type converter code comments * fix cherry-pick merge issues, fix tests pointing to old typeutils interface type still
2023-09-21[feature] Implement explicit domain allows + allowlist federation mode (#2200)Libravatar tobi10
* love like winter! wohoah, wohoah * domain allow side effects * tests! logging! unallow! * document federation modes * linty linterson * test * further adventures in documentation * finish up domain block documentation (i think) * change wording a wee little bit * docs, example * consolidate shared domainPermission code * call mode once * fetch federation mode within domain blocked func * read domain perm import in streaming manner * don't use pointer to slice for domain perms * don't bother copying blocks + allows before deleting * admonish! * change wording just a scooch * update docs
2023-09-12[feature] add paging to account follows, followers and follow requests ↵Libravatar kim8
endpoints (#2186)
2023-09-12[feature] Allow admins to expire remote public keys; refetch expired keys on ↵Libravatar tobi2
demand (#2183)
2023-09-07[chore] much improved paging package (#2182)Libravatar kim1
2023-09-04[feature] Store admin actions in the db, prevent conflicting actions (#2167)Libravatar tobi3
2023-08-19[feature] Instance rules (#2125)Libravatar f0x5213
* init instance rules database model, admin api * expose instance rules in public instance api * public /api/v1/instance/rules route * GET ruleById * createRule route * createRule auth check * updateRule * deleteRule * list rules on about page * ruleGet auth * add about page ids for anchors * process and store adding violated rules to reports * admin api models for instance rules * instance rule edit frontend * change rule inputs to textareas * database fixes after rebase (#2124) * remove unused imports * fix db migration column name * fix tests * fix more tests * fix postgres error with wrongly used Ident * add some tests, fiddle with rule model a bit, fix postgres migration * swagger docs --------- Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2023-08-17[bugfix] fix double firing bun.DB query hooks (#2124)Libravatar kim2
* improve bun.DB wrapping readability + comments, fix double-firing query hooks * fix incorrect code comment placement * fix linter issues * Update internal/db/basic.go * do as the linter commmands ... --------- Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: Daenney <daenney@users.noreply.github.com>
2023-08-11[bugfix] Use custom bluemonday policy to disallow inline img tags (#2100)Libravatar tobi1
2023-08-07[chore] Use generic pointer function (#2080)Libravatar Daenney5
This replaces the different $TypePtr functions with a generic implementation.
2023-08-07[feature] Allow full BCP 47 in language inputs (#2067)Libravatar Vyr Cossont3
* Allow full BCP 47 in language inputs Fixes #2066 * Fuse validation and normalization for languages * Remove outdated comment line * Move post language canonicalization test
2023-08-02[bugfix] Rework MultiError to wrap + unwrap errors properly (#2057)Libravatar tobi11
* rework multierror a bit * test multierror
2023-08-02[bugfix] Allow instance accounts to be shown in search results in certain ↵Libravatar tobi1
circumstances (#2053)
2023-07-31[feature] Hashtag federation (in/out), hashtag client API endpoints (#2032)Libravatar tobi15
* update go-fed * do the things * remove unused columns from tags * update to latest lingo from main * further tag shenanigans * serve stub page at tag endpoint * we did it lads * tests, oh tests, ohhh tests, oh tests (doo doo doo doo) * swagger docs * document hashtag usage + federation * instanceGet * don't bother parsing tag href * rename whereStartsWith -> whereStartsLike * remove GetOrCreateTag * dont cache status tag timelineability
2023-07-31[performance] cache follow, follow request and block ID lists (#2027)Libravatar kim2
2023-07-29[feature] Implement markers API (#1989)Libravatar Vyr Cossont3
* Implement markers API Fixes #1856 * Correct import grouping in markers files * Regenerate Swagger for markers API * Shorten names for readability * Cache markers for 6 hours * Update DB ref * Update envparsing.sh