summaryrefslogtreecommitdiff
path: root/internal
AgeCommit message (Collapse)AuthorFiles
2024-06-03[feature/frontend] Add debug sections to settings panel (#2950)Libravatar tobi3
* [feature/frontend] Add debug sections to settings panel * max-width * swagger
2024-05-31[feature] Add from: search operator and account_id query param (#2943)Libravatar Vyr Cossont8
* Add from: search operator * Fix whitespace in Swagger YAML comment * Move query parsing into its own method * Document search * Clarify post search scope
2024-05-31[feature] Implement Filter API v2 (#2936)Libravatar Vyr Cossont64
* Use correct entity name * We support server-side filters now * Document filter v1 methods that can throw a 409 * Validate v1 filter phrase as filter title * Always check v1 filter API status codes in tests * Document keyword minimum requirement on filter API v1 * Make it possible to specify filter keyword update columns per filter keyword * Implement v2 filter API * Fix lint and tests * Update Swagger spec * Fix filter update test * Update Swagger spec *correctly* * Update actual files Swagger spec was generated from * Remove keywords_attributes and statuses_attributes * Add test for serialization of empty filter * More helpful messages when object is owned by wrong account
2024-05-30[chore] Make worker run messages debug output (#2944)Libravatar Daenney3
On startup and shutdown of a worker, we log a message of the worker being started together with a textual representation of a memory address. Though this can be handy for developers to debug startup/shutdown sequencing issues of the workers, it's typically not very useful or informative for an admin. We can also output a lot of these (on my system I get 265 lines of these during startup). This changes the messages from Info to Debug, to not print them under normal circumstances.
2024-05-29[chore] improved startup / shutdown (#2925)Libravatar kim2
* improved server shutdown with more precise shutdown of modules + deferring of ALL of it * make the same changes to the testrig server * use testrig specific func * update variable name to fix nilptr * fix removal of setting db on state
2024-05-29[feature] Implement profile API (#2926)Libravatar Vyr Cossont5
* Implement profile API This Mastodon 4.2 extension provides capabilities missing from the existing Mastodon account update API: deleting an account's avatar or header. See: https://docs.joinmastodon.org/methods/profile/ * Move profile media methods to media processor * Remove check for moved account
2024-05-29[feature] Debug admin endpoint to clear caches (#2940)Libravatar tobi5
* [feature] Debug admin endpoint to clear caches * go fmt
2024-05-28[chore/bugfix] Don't cache MovedTo account (#2939)Libravatar tobi1
2024-05-27[feature/frontend] Let admins send test email to validate SMTP config (#2934)Libravatar tobi4
* [feature/frontend] Let admins send test email to validate SMTP config * wee
2024-05-27[experiment] add alternative wasm sqlite3 implementation available via ↵Libravatar kim20
build-tag (#2863) This allows for building GoToSocial with [SQLite transpiled to WASM](https://github.com/ncruces/go-sqlite3) and accessed through [Wazero](https://wazero.io/).
2024-05-27[chore] Fix report email link (#2932)Libravatar tobi1
2024-05-22[performance] update storage backend and make use of seek syscall when ↵Libravatar kim13
available (#2924) * update to use go-storage/ instead of go-store/v2/storage/ * pull in latest version from codeberg * remove test output :innocent: * add code comments * set the exclusive bit when creating new files in disk config * bump to actual release version * bump to v0.1.1 (tis a simple no-logic change) * update readme * only use a temporary read seeker when decoding video if required (should only be S3 now) * use fastcopy library to use memory pooled buffers when calling TempFileSeeker() * update to use seek call in serveFileRange()
2024-05-21[performance] cache v2 filter keyword regular expressions (#2903)Libravatar kim5
* add caching of filterkeyword regular expressions * formatting * fix WholeWord nil check
2024-05-13[performance] update go-structr and go-mutexes with memory usage ↵Libravatar kim1
improvements (#2909) * update go-structr and go-mutexes with memory usage improvements * bump to go-structr v0.8.4
2024-05-06update the total ratios calculation to include ALL caches (previously was ↵Libravatar kim2
missing a few!) (#2907)
2024-05-06feature: filters v2 server-side warning/hiding (#2793)Libravatar Vyr Cossont23
* Remove dead code * Filter statuses when converting to frontend representation * status.filtered is an array * Make matching case-insensitive * Remove TODOs that don't need to be done now * Add missing filter check for notification * lint: rename ErrHideStatus * APIFilterActionToFilterAction not used yet * swaggerino docseroni * Address review comments * Add apimodel.FilterActionNone --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com> Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-05-05close + drain body if response body is too large (#2897)Libravatar kim1
2024-05-05[feature] Add HTTP header permission section to frontend (#2893)Libravatar tobi2
* [feature] Add HTTP header filter section to frontend * tweak naming a bit
2024-05-02add missing caches to the main cache sweep command (#2891)Libravatar kim1
2024-05-02[bugfix] Lock when checking/creating notifs to avoid race (#2890)Libravatar tobi15
* [bugfix] Lock when checking/creating notifs to avoid race * test notif spam
2024-05-01[feature] Page through accounts as moderator (#2881)Libravatar tobi8
* [feature] Page through accounts as moderator * aaaaa * use COLLATE "C" for Postgres to ensure same ordering as SQLite * fix typo, test paging up * don't show moderation / info for our instance acct
2024-05-01[bugfix] function queue memory pools limitlessly grow (#2882)Libravatar kim1
* updates the simple queue memory pool to actually self-clean + limit growth * update memory pool cleaning frequency
2024-05-01[bugfix] flaky paging test (#2888)Libravatar kim1
2024-04-30[bugfix] further paging mishaps (#2884)Libravatar kim5
* FURTHER paging shenanigans :smiling_face_with_tear: * remove cursor logic from ToLinkURL() * fix up paging tests --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-04-30[bugfix] retry on http 500 errors *inclusive* (#2886)Libravatar kim1
2024-04-30[chore] include attemptno in httpclient logs (#2887)Libravatar kim1
* include request attempt number in httpclient logs * slightly nicer attempt number formatting
2024-04-30[bugfix] paging rel links (#2883)Libravatar kim3
* fix paging so it uses correct cursor query parameter name * improved code comment * whoops, flip the cursoring :facepalm: * fix the broken test
2024-04-29[chore] Fix conflict in workers tests (#2880)Libravatar tobi3
* [chore] Fix conflict in workers tests * commenty-wenty
2024-04-26[bugfix] Fix error string typo (#2873)Libravatar kim1
2024-04-26[performance] update remaining worker pools to use queues (#2865)Libravatar kim63
* start replacing client + federator + media workers with new worker + queue types * refactor federatingDB.Delete(), drop queued messages when deleting account / status * move all queue purging to the processor workers * undo toolchain updates * code comments, ensure dereferencer worker pool gets started * update gruf libraries in readme * start the job scheduler separately to the worker pools * reshuffle ordering or server.go + remove duplicate worker start / stop * update go-list version * fix vendoring * move queue invalidation to before wipeing / deletion, to ensure queued work not dropped * add logging to worker processing functions in testrig, don't start workers in unexpected places * update go-structr to add (+then rely on) QueueCtx{} type * ensure more worker pools get started properly in tests * fix remaining broken tests relying on worker queue logic * fix account test suite queue popping logic, ensure noop workers do not pull from queue * move back accidentally shuffled account deletion order * ensure error (non nil!!) gets passed in refactored federatingDB{}.Delete() * silently drop deletes from accounts not permitted to * don't warn log on forwarded deletes * make if else clauses easier to parse * use getFederatorMsg() * improved code comment * improved code comment re: requesting account delete checks * remove boolean result from worker start / stop since false = already running or already stopped * remove optional passed-in http.client * remove worker starting from the admin CLI commands (we don't need to handle side-effects) * update prune cli to start scheduler but not all of the workers * fix rebase issues * remove redundant return statements * i'm sorry sir linter
2024-04-26[chore] Upgrade our Go version to 1.22 (#2862)Libravatar Daenney1
* [chore] Upgrade our Go version to 1.22 With Go 1.22 having been released at the start of February, it's now been a few months. No major issues have shown up, and the two point release since then have primarily been security fixes plus some general bug fixing. This sets the required Go version to 1.22, as there's nothing in 1.22.1 or 1.22.2 that we would explicitly require. It sets the toolchain to the latest point release, to ensure we pick up any fixes from there when building releases etc. * [chore] Update CI to Go 1.22 * [chore] Update golangci-lint to 1.25.7 Newer version should know about Go 1.22 and run fine. * [chore] Update Docker container to Go 1.22 * [chore] Update Dockerfile to newer Alpine version * sign drone.yml * add missing license header --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-04-22[chore] Update robots.txt (#2856)Libravatar Daenney1
This updates the robots.txt based on the list of the ai.robots.txt repository. We can look at automating that at some point. It's worth pointing out that some robots, namely the ones by Bytedance, are known to ignore robots.txt entirely.
2024-04-18[bugfix] Fix incorrect field name for status source, add helpful message (#2854)Libravatar tobi3
* [bugfix] Fix incorrect field name for status source, add helpful message * swagger * yyammm
2024-04-18[feature] Stub conversations endpoint (#2853)Libravatar tobi4
2024-04-18[feature] Stub account mutes endpoint (#2852)Libravatar tobi3
* [feature] Stub account mutes endpoint * swagger? i barely know 'er!
2024-04-17update to set requesting account when deleting status (#2849)Libravatar kim1
2024-04-17[feature] Status source endpoint (#2848)Libravatar tobi6
* [feature] statusSource endpoint * finish up
2024-04-17[feature] Stub status history endpoint (#2847)Libravatar tobi5
2024-04-17[bugfix] Fix minor API issue w/ boosted statuses (#2846)Libravatar tobi3
2024-04-16[bugfix] fix get all tokens (#2841)Libravatar tobi2
2024-04-16[feature/performance] Store account stats in separate table (#2831)Libravatar tobi42
* [feature/performance] Store account stats in separate table, get stats from remote * test account stats * add some missing increment / decrement calls * change stats function signatures * rejig logging a bit * use lock when updating stats
2024-04-15[performance] cached oauth database types (#2838)Libravatar kim16
* update token + client code to use struct caches * add code comments * slight tweak to default mem ratios * fix envparsing * add appropriate invalidate hooks * update the tokenstore sweeping function to rely on caches * update to use PutClient() * add ClientID to list of token struct indices
2024-04-15[chore] Turn `accounts-registration-open` false by default (#2839)Libravatar tobi1
2024-04-13[feature] Admin accounts endpoints; approve/reject sign-ups (#2826)Libravatar tobi30
* update settings panels, add pending overview + approve/deny functions * add admin accounts get, approve, reject * send approved/rejected emails * use signup URL * docs! * email * swagger * web linting * fix email tests * wee lil fixerinos * use new paging logic for GetAccounts() series of admin endpoints, small changes to query building * shuffle useAccountIDIn check *before* adding to query * fix parse from toot react error * use `netip.Addr` * put valid slices in globals * optimistic updates for account state --------- Co-authored-by: kim <grufwub@gmail.com>
2024-04-13[performance] update GetAccountsByIDs() to use the new multi cache loader ↵Libravatar kim1
endpoint (#2828) * update GetAccountsByIDs() to use the new multi cache loader endpoint * fix broken import
2024-04-12[bugfix] Include MIME email headers to avoid mangling non-ascii text (#2827)Libravatar tobi2
2024-04-11[feature] New user sign-up via web page (#2796)Libravatar tobi43
* [feature] User sign-up form and admin notifs * add chosen + filtered languages to migration * remove stray comment * chosen languages schmosen schmanguages * proper error on local account missing
2024-04-11[performance] massively improved ActivityPub delivery worker efficiency (#2812)Libravatar kim23
* add delivery worker type that pulls from queue to httpclient package * finish up some code commenting, bodge a vendored activity library change, integrate the deliverypool changes into transportcontroller * hook up queue deletion logic * support deleting queued http requests by target ID * don't index APRequest by hostname in the queue * use gorun * use the original context's values when wrapping msg type as delivery{} * actually log in the AP delivery worker ... * add uncommitted changes * use errors.AsV2() * use errorsv2.AsV2() * finish adding some code comments, add bad host handling to delivery workers * slightly tweak deliveryworkerpool API, use advanced sender multiplier * remove PopCtx() method, let others instead rely on Wait() * shuffle things around to move delivery stuff into transport/ subpkg * remove dead code * formatting * validate request before queueing for delivery * finish adding code comments, fix up backoff code * finish adding more code comments * clamp minimum no. senders to 1 * add start/stop logging to delivery worker, some slight changes * remove double logging * use worker ptrs * expose the embedded log fields in httpclient.Request{} * ensure request context values are preserved when updating ctx * add delivery worker tests * fix linter issues * ensure delivery worker gets inited in testrig * fix tests to delivering messages to check worker delivery queue * update error type to use ptr instead of value receiver * fix test calling Workers{}.Start() instead of testrig.StartWorkers() * update docs for advanced-sender-multiplier * update to the latest activity library version * add comment about not using httptest.Server{}
2024-04-08[bugfix] Ensure side effects for local -> local follows get processed (#2820)v0.15.0-rc2Libravatar tobi2
2024-04-04fix possible nil panic (#2809)Libravatar kim1