summaryrefslogtreecommitdiff
path: root/internal
AgeCommit message (Collapse)AuthorFiles
2022-11-24[bugfix] Fix status boosts giving 404 (#1137)Libravatar tobi3
We broke this at some point recently, and i'm not sure when. In any case, i updated some of the logic in there + added a test for it.
2022-11-24[bugfix] Prevent future statuses entering timelines (#1134)Libravatar tobi5
* [bugfix] Prevent future statuses entering timeline Statuses created more than 5 minutes into the future are now rejected in the visibility package. * Come on buddy
2022-11-24[chore] cleanup storage implementation, no need for multiple interface types ↵Libravatar kim30
(#1131) Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-23[feature/performance] Fail fast when doing remote transport calls inside ↵Libravatar tobi17
incoming request contexts (#1119) * [feature/performance] Fail fast when doing remote transport calls inside incoming request contexts * [chore] Reduce outgoing request timeout to 15s * log error messages when fastfailing * use context.Value() instead of wrapped context, wrap error with fastfail instead of extra log entry * add fast-fail context key test Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: kim <grufwub@gmail.com>
2022-11-23[chore/frontend] remove references to unused bundle.js (#1128)Libravatar tobi4
2022-11-22[feature] Prune timelines once per hour to plug memory leak (#1117)Libravatar tobi16
* export highest/lowest ULIDs as proper const * add stop + start to timeline manager, other small fixes * unexport unused interface funcs + tidy up * add LastGot func * add timeline Prune function * test prune * update lastGot
2022-11-22[chore] use kv.KVStore also for S3 storage (#1113)Libravatar kim2
* replace s3 storage implementation to also use kv.KVStore Signed-off-by: kim <grufwub@gmail.com> * pull in latest `go-store` fix Signed-off-by: kim <grufwub@gmail.com> * pull-in go-store v2.0.9 fixes, update s3 put chunk size to 5MiB Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-22[chore] markdown: disable Smartypants rendering (#1111)Libravatar Norwin2
* [enhancement] markdown: disable SmartyPantsFractions fixes #1028 * some fractions are still converted to unicode to fix that, we might need to disable smartypants indeed in its entirety * disable smartypants completely for lack of a better simple solution
2022-11-20[chore] simplify logging to remove "safetywriter" given os.File has ↵Libravatar kim2
concurrency protection (#1083) Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-20[chore] improve errors returned fetching account/statues from DB (#1084)Libravatar kim2
Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-20[performance] add account block DB cache and remove block query joins (#1085)Libravatar kim11
* add account block DB cache and remove reliance on relational joins * actually include cache key arguments... * add a PutBlock() method which also updates the block cache, update tests accordingly * use `PutBlock` instead of `Put(ctx, block)` * add + use functions for deleting + invalidating blocks Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2022-11-20[bugfix] fix possible infinite loop on federated AP profile delete (#1091)Libravatar kim1
* refactor federator account statuses delete to better catch errors, ensure next maxID is always set Signed-off-by: kim <grufwub@gmail.com> * fix error statement missing 2nd format operator Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-19[feature] Support markdown format for Account bio/note (#1037)Libravatar Michael Manfre2
* [feature] Status format also controls bio format * test
2022-11-18[performance] replace account emojis relational query with separate calls to ↵Libravatar kim2
emojiDB to rely on cache (#1074) Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-18[performance] replace status query relationals with separate calls in order ↵Libravatar kim2
to rely on caches more (#1073) Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-18[performance] don't use relations to select notification structs, use caches ↵Libravatar tobi3
instead (#1072)
2022-11-17[chore] Replace blocking Floc with Topics. (#1068)Libravatar psa1
Google abandoned Floc in favour of Topics and changed the necessary permissions policy. Currently, the Floc policy will block Topics. This change includes switching to the updated policy to be ahead of Google abandoning recognising the Floc policy. Update the function documentation to include the current relevant documentation.
2022-11-16[chore] reversion: use specific columns for updating user again (#1059)Libravatar tobi3
2022-11-15[chore] update database caching library (#1040)Libravatar kim41
* convert most of the caches to use result.Cache{} * add caching of emojis * fix issues causing failing tests * update go-cache/v2 instances with v3 * fix getnotification * add a note about the left-in StatusCreate comment * update EmojiCategory db access to use new result.Cache{} * fix possible panic in getstatusparents * further proof that kim is not stinky
2022-11-15[chore] refactor test/cliparsing.sh into a go test below internal/config (#1036)Libravatar Mara Sophie Grosch5
Also adds AddGlobalFlags and AddServerFlags as methods on ConfigState, very useful for testing.
2022-11-15[bugfix] Fix unicode-unaware word boundary check in hashtags (#1049)Libravatar ugla4
* [bugfix] Fix unicode-unaware word boundary check in hashtag regex Go `\b` does not care for Unicode, and without lookahead, the workarounds got very ugly. So I replaced the regex with a parser. The parser runs in O(n) time and performance should not be affected. * [bugfix] Add back hashtag max length and add tests for it
2022-11-15[feature] Serialize local account role via API, and show it via web view (#1045)Libravatar tobi5
* [feature] Add 'role' field to api serialization of local accounts * [chore] Add a bit of license text while I'm here * [frogend] render account role on same line as username in web view of profile * style tweaking on role badges, general profile header layout * profile stats wrapping * don't render standard 'user' role on web view Co-authored-by: f0x <f0x@cthu.lu>
2022-11-14[feature] Allow newly uploaded emojis to be placed in categories (#939)Libravatar tobi28
* [feature] Add emoji categories GET Serialize emojis in appropriate categories; make it possible to get categories via the admin API * [feature] Create (or use existing) category for new emoji uploads * fix lint issue * update misleading line in swagger docs
2022-11-14[feature] add instance-expose-public-timeline flag (#1039)Libravatar Rob Sargant7
* Add instance-expose-public-timeline flag Adds a config flag that allows unauthenticated access to /api/v1/timelines/public. Defaults to false to replicate existing behaviour. * Update structure following review * Add comment * Fix linting
2022-11-13[bugfix] Fix login on Mastodon iOS app for users with no statuses (#1042)Libravatar David Baker4
* Fix login on Mastodon iOS app for users with no statuses Mastodon for iOS can't cope with an empty string for a date and expect a JSON `null` instead. Fixes https://github.com/superseriousbusiness/gotosocial/issues/1010 * Fix expected values in tests to match
2022-11-13[chore] bump go-cache to v3.1.7 to fix possible issues with zero value keys ↵Libravatar kim1
(#1038) Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-11[chore] Fixes + updates in emoji dereferencing logic (#1022)Libravatar tobi8
* fix incorrect static remote url use for emojis * warn when emoji/attachment already exists * defer emoji postdata execution * rename ctx to innerCtx for clarity * warn on emoji too large * small efficiency fix in fetchRemoteAccountEmojis * tidy up lock+load * lock processing emojis * fix little fucky wucky * this wasn't go fmted for some reason
2022-11-11[feature] Read + Write tombstones for deleted Actors (#1005)Libravatar tobi13
* [feature] Read + Write tombstones for deleted Actors * copyTombstone * update to use resultcache instead of old ttl cache Signed-off-by: kim <grufwub@gmail.com> * update go-cache library to fix result cache capacity / ordering bugs Signed-off-by: kim <grufwub@gmail.com> * bump go-cache/v3 to v3.1.6 to fix bugs Signed-off-by: kim <grufwub@gmail.com> * switch on status code * better explain ErrGone reasoning Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: kim <grufwub@gmail.com>
2022-11-11[feature] S3: add config flag to proxy S3 media (#1014)Libravatar Mara Sophie Grosch5
* S3: add config value "proxy" for not redirecting Signed-off-by: Mara Sophie Grosch <littlefox@lf-net.org> * S3: document new config value "proxy" * S3: add new config value "proxy" to test scripts Signed-off-by: Mara Sophie Grosch <littlefox@lf-net.org>
2022-11-11[chore] close in-storage media reader _before_ opening write, no need to ↵Libravatar kim2
leave it hanging around (#1016) Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-08[feature] Make instance thumbnail configurable via admin panel (#973)Libravatar tobi7
* [feature] Make instance thumbnail configurable via admin panel * log db errors in InstanceToAPIInstance * only update instance in db if necessary * start adding tests * finish test
2022-11-08[frontend] Custom Emoji Deletion (#994)Libravatar f0x521
* re-add eslint * fix oauth url getting too long * actually attach single emoji get and delete routes * basic emoji details + deletion using rtk query * refactor emoji upload to rtk query * clean up old redux api+reducers for custom emoji * fix validation order * refactor custom emoji form fields * remove unused requires * cleanup, fix most eslint errors * more small eslint fixes * fix max emoji size * tiny bit of function documentation
2022-11-08[feature] various worker / request queue improvements (#995)Libravatar kim4
* greatly simplify httpclient request queuing Signed-off-by: kim <grufwub@gmail.com> * improved request queue mutex logic Signed-off-by: kim <grufwub@gmail.com> * use improved hashmap library Signed-off-by: kim <grufwub@gmail.com> * add warn logging when request queues are full Signed-off-by: kim <grufwub@gmail.com> * improve worker pool prefix var naming Signed-off-by: kim <grufwub@gmail.com> * improved worker pool error logging Signed-off-by: kim <grufwub@gmail.com> * move error message into separate field Signed-off-by: kim <grufwub@gmail.com> * remove old log statement Signed-off-by: kim <grufwub@gmail.com> * don't export worker message, it gets very spammy :') Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-07[chore] Fix rel="nofollow" so that it only applies to external links (#991)Libravatar D1
Resolves https://github.com/superseriousbusiness/gotosocial/issues/990
2022-11-06[bugfix] KVStore doesn't like lost+found directory (#972)Libravatar kim2
* bump go-store version to v2.0.5, init kv.KVStore without initial clean (as we are using for storage, not as a key-value store) Signed-off-by: kim <grufwub@gmail.com> * remove newline Signed-off-by: kim <grufwub@gmail.com> Signed-off-by: kim <grufwub@gmail.com>
2022-11-06[feature] Make rate limit requests amount configurable (#966)Libravatar tobi5
* update rate limit documentation * regenerate landingpage config helpers * make rate limit rate configurable
2022-11-05[bugfix] Check `media-description-min-chars` on submission of new status (#960)Libravatar tobi4
2022-11-05[chore] bump gruf/go-store to v2 (#953)Libravatar tobi11
* [chore] bump gruf/go-store to v2 * no more boobs
2022-11-05[bugfix] Increase field size limits when registering apps (#958)Libravatar tobi1
2022-11-05[bugfix] use the landing page user directly (#956)Libravatar Adam Harvey1
If set, the landing page user configuration value is used as a Gin context parameter, which seems incorrect, since a normal request isn't going to have a parameter named after an arbitrarily configured user. Instead, the user name should be used directly when building the redirect URL.
2022-11-03[bugfix] Wrap media in read closer (#941)Libravatar tobi15
* use readcloser for content.Content * call media postdata function no matter what * return a readcloser from data func * tidy of logic of readertostore * fix whoopsie
2022-11-03[bugfix] Use []rune to check length of user-submitted text (#948)Libravatar tobi6
2022-11-03[feature] Allow user to show instead of landing page on / (#922)Libravatar Mia Heidenstedt6
* configurable user instead of landing page * rename DefaultUser to LandingPageUser * code review changes and fix tests * try to fix pipeline error * code review changes * code review changes * code review changes * remove unnecessary line
2022-11-02[frontend] change bundler to skulk (#942)Libravatar f0x521
* replace web bundler with skulk * upgrade skulk * add license
2022-11-01[bugfix] create admin_account_actions table in tx (#940)Libravatar Terin Stock1
The migration that adds the `admin_account_actions` table did so at the same time as adding indexes onto the new table. This code was ran inside a `RunInTx` function, but the table creation did not use the transaction reference, while the creation of the indexes did. This could cause a race between the table and index creations, depending on the scheduling order. If the table creation did not win the race, then the migration would fail. This changeset corrects the table creation to also be done inside the same transaction as the index creation. Signed-off-by: Terin Stock <terinjokes@gmail.com> Signed-off-by: Terin Stock <terinjokes@gmail.com>
2022-10-29[bugfix] Fix imports for helpers.gen.go (#924)Libravatar Mia Heidenstedt1
2022-10-29[bugfix] Prevent future statuses showing in timelines (#932)Libravatar tobi2
2022-10-17[docs] Use correct form for status submit (#915)Libravatar tobi1
2022-10-14[feature] Add emoji DELETE handler at `/api/v1/admin/custom_emojis` (#913)Libravatar tobi10
* add emoji DELETE handler * no need to process error (thanks kim) * don't double check if user is admin * add missing security annotation
2022-10-13[feature] Add `/api/v1/admin/custom_emojis/{id}` endpoint for single emoji ↵Libravatar tobi9
GET (#910) * fix error in prev swagger docs * add GET for single admin emoji