summaryrefslogtreecommitdiff
path: root/internal
AgeCommit message (Collapse)AuthorFiles
2024-12-31[bugfix] more little edit fixes (#3633)Libravatar kim2
* fix slice size calculation * stop attached status edit slice getting cached
2024-12-28[bugfix] Advertise audio/mpeg as supported (#3632)Libravatar Daenney4
This will be either an mp1, mp2 or mp3 file. In practice it'll probably be mp3, but this handles mp1 too for good measure. We don't advertise audio/mp1 as a supported media type since best I can tell that was never a MIME type that's been used. This also changes the returned MIME-type for mp2 and mp3 to audio/mpeg, to match what's expected and supported by most things nowadays. Fixes: #3531
2024-12-24[bugfix] small editing tweaks (#3631)Libravatar kim3
* ensure edited_at isn't set on boost wrapper statuses * improve handling of remote status updated_at to fix previous cases * formatting * add remote status published / updated field validation checks, handle appropriately in handleStatusEdit() * specifically allowed updated to be equal to published * only check creation date change when an existing status
2024-12-23[feature] add support for clients editing statuses and fetching status ↵Libravatar kim28
revision history (#3628) * start adding client support for making status edits and viewing history * modify 'freshest' freshness window to be 5s, add typeutils test for status -> api edits * only populate the status edits when specifically requested * start adding some simple processor status edit tests * add test editing status but adding a poll * test edits appropriately adding poll expiry handlers * finish adding status edit tests * store both new and old revision emojis in status * add code comment * ensure the requester's account is populated before status edits * add code comments for status edit tests * update status edit form swagger comments * remove unused function * fix status source test * add more code comments, move media description check back to media process in status create * fix tests, add necessary form struct tag
2024-12-23[chore] Stub /api/v1/announcements implementation (#3630)Libravatar Daenney3
* [chore] Stub /api/v1/announcements implementation This implements the /api/v1/announcements endpoint by simply returning an empty array. This indicates there are no instance announcements. Some clients retrieve this endpoint and get surprised by a 404. It tends to be harmless, but results in some unnecessary logging when trying to debug other things. * [fix] Forgot some swagger * [fix] Fix swagger some more
2024-12-18[bugfix] Load instance-wide custom css in page stylesheets template (#3601)Libravatar CDN9
* [bugfix] Load instance-wide custom css in page stylesheets template * [chore] remove redunt import
2024-12-09[chore] Log during potentially long migrations (#3613)Libravatar tobi4
* [chore] Log during potentially long migrations * remove unneeded log lines
2024-12-08[feature] Allow partial-word hashtags using non-breaking spaces (#3606)Libravatar tobi2
* [feature] Allow partial-word hashtags using non-breaking spaces * update docs
2024-12-08[chore] stub /api/v1/accounts/{id}/featured_tags endpoint (#3598)Libravatar Patrycja2
* [chore] stub /api/v1/accounts/{id}/featured_tags endpoint * fix swagger parsing issue --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com> Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-12-05[feature] add support for receiving federated status edits (#3597)Libravatar kim81
* add support for extracting Updated field from Statusable implementers * add support for status edits in the database, and update status dereferencer to handle them * remove unused AdditionalInfo{}.CreatedAt * remove unused AdditionalEmojiInfo{}.CreatedAt * update new mention creation to use status.UpdatedAt * remove mention.UpdatedAt, fixes related to NewULIDFromTime() change * add migration to remove Mention{}.UpdatedAt field * add migration to add the StatusEdit{} table * start adding tests, add delete function for status edits * add more of status edit migrations, fill in more of the necessary edit delete functionality * remove unused function * allow generating gotosocial compatible ulid via CLI with `go run ./cmd/gen-ulid` * add StatusEdit{} test models * fix new statusedits sql * use model instead of table name * actually remove the Mention.UpdatedAt field... * fix tests now new models are added, add more status edit DB tests * fix panic wording * add test for deleting status edits * don't automatically set `updated_at` field on updated statuses * flesh out more of the dereferencer status edit tests, ensure updated at field set on outgoing AS statuses * remove media_attachments.updated_at column * fix up more tests, further complete the dereferencer status edit tests * update more status serialization tests not expecting 'updated' AS property * gah!! json serialization tests!! * undo some gtscontext wrapping changes * more serialization test fixing :smiling_face_with_tear: * more test fixing, ensure the edit.status_id field is actually set :facepalm: * fix status edit test * grrr linter * add edited_at field to apimodel status * remove the choice of paging on the timeline public filtered test (otherwise it needs updating every time you add statuses ...) * ensure that status.updated_at always fits chronologically * fix more serialization tests ... * add more code comments * fix envparsing * update swagger file * properly handle media description changes during status edits * slight formatting tweak * code comment
2024-12-04[feature] unending polls (#3592)Libravatar kim3
* adds support for unending polls to be created locally * remove unused argument
2024-12-03[bugfix] Load instance-wide custom css unconditionally in thread details ↵Libravatar CDN1
page (#3595)
2024-12-02[feature] Add global instance CSS customization setting (#3352)Libravatar Victor Dyotte20
Allow instance admins to add custom CSS that will affect every page of their instance. This is done with a new CustomCSS instance setting that works pretty much exactly like the Users CustomCSS property. This custom CSS is then requested for every page load. User styles/themes take precedence over this CSS. Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-11-29[performance] use new instance of bun.DB *after* migrations to reduce number ↵Libravatar kim1
of in-memory model schema (#3578) * use new instance of bun.DB *after* migrations to reduce number of model schema in-memory * update sqlite address comment
2024-11-28send out poll votes as separate create activities given that no other AP ↵Libravatar kim3
servers support multiple objects in a single activity (#3582)
2024-11-28[chore] rename New___(string) int signature functions to Parse___(string) ↵Libravatar kim7
int (#3580) * rename New___(string) int {} signature functions to Parse___(string) int {} * remove test output
2024-11-27[bugfix] Log + ignore unknown notification types (#3577)Libravatar tobi4
* [bugfix] Log + ignore unknown notification types * pass context to ParseNotificationTypes
2024-11-26[bugfix] Allow unsetting filter expiration dates (#3560)Libravatar Vyr Cossont15
* Regression tests for #3497 (v1 and v2) * use Nullable type for v2 form.expires_in --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-11-25[bugfix] notification types missing from link header (#3571)Libravatar kim6
* ensure notification types get included in link header query for notifications * fix type query keys
2024-11-25[chore] Bump tooling versions, bump go -> v1.23.0 (#3258)Libravatar tobi1
* [chore] Bump tooling versions, bump go -> v1.23.0 * undo silly change * sign * bump go version in go.mod * allow overflow in imaging * goreleaser deprecation notices * bump versions * undo accidental rebase change * update container versions to just use latest major version * update swagger to our release with go1.23 fix * update goreleaser to use our vendored swagger version --------- Co-authored-by: kim <grufwub@gmail.com>
2024-11-25[performance] convert enum strings to ints (#3558)Libravatar kim32
* convert statuses.visibility and notifications.notification_type columns from type string -> int for performance / space savings * fix test trying to compare string to int * fix instance count query using string literal instead of gtsmodel const type * ensure a default value is always set * also migrate the account settings and sin bin status tables * initialize maps outside loops and place into singular enum mapping creation func * use int16 for enum types * update sinbinstatus creation to be from a snapshot at initial creation * add snapshot of poll type at creation time
2024-11-21[feature] Add domain permission drafts and excludes (#3547)Libravatar tobi36
* [feature] Add domain permission drafts and excludes * fix typescript complaining * lint * make filenames more consistent * test own domain excluded
2024-11-21[feature] Allow emoji shortcode to be 1-character length (#3556)Libravatar tobi6
* [feature] Allow emoji shortcode to be 1-character length * testerino fixeroni * spaghet
2024-11-21[bugfix] post counters should not include direct messages (#3554)Libravatar Jannis4
* [bugfix] post counters should not include direct messages #3504 The fix is relativly simple, it just adds a line to the relevant function which excludes all private posts. * Formating fix * mb
2024-11-11[performance] minimise log field allocations (#3529)Libravatar kim29
* when appending log field only do so by minimal amount * move slice utils to separate package to fix import cycle, add GrowJust() and AppendJust() functions * fix GrowJust() not returning slice of same length * improved xslices tests * make AppendJust() test check for slice contents, fix AppendJust() final copying behaviour * add a +1 with field growth to try minimise allocation for log 'msg' field
2024-11-06[chore] update go ffmpreg to v0.6.0 (#3515)Libravatar kim4
* pull in go-ffmpreg v0.6.0 * add code comment * grrr linter * set empty module name when calling ffmpeg / ffprobe
2024-11-05[bugfix] sets the max value placeholders to MaxInt32 instead of MaxInt (#3517)v0.17.3Libravatar kim3
* sets the max value placeholders to MaxInt32 instead of MaxInt * update tests
2024-11-05[bugfix] Fix setting immediate `expires_at` value on filter endpoints (#3513)v0.17.2Libravatar tobi6
* [bugfix] Fix setting immediate `expires_at` value on filter endpoints * update wording * update wording * oh my
2024-11-05previously we were using the ffmpeg runner for ffprobe :facepalm: (#3512)Libravatar kim1
2024-11-04[feature] add support for hinting via api/v_/instance preferred image / ↵Libravatar kim5
video max sizes (#3505) * add support for hinting via api/v_/instance endpoints a preferred image / video size limit * fix tests expecting old default values
2024-11-04[bugfix] determine mime-type to use during ffprobe evaluation stage, don't ↵Libravatar kim9
bother checking against file extension (#3506) * determine mime-type to use during ffprobe evaluation stage, don't bother rechecking by file extension * set mjpeg content-type * fix up tests expecting differing default values
2024-10-28[bugfix] support classifying correct video codec without audio as webm (#3494)Libravatar kim3
* for webm support video:[vp8,vp9,av1] and audio:[NONE,vorbis,opus] * improved unsupported data type error output
2024-10-28[chore] pull in go-ffmpreg v0.4.1 (#3485)Libravatar kim1
* pull in go-ffmpreg v0.4.1 * bring back GTS_WAZERO_COMPILATION_CACHE
2024-10-22[bugfix] incorrect /api/v_/instance domain uri fields (#3477)Libravatar kim3
* update instance v1 / v2 endpoints to set uri / domain correctly (i.e. account domain) * fix tests relying on old instance behaviour
2024-10-21[feature] Add image descriptions for default avatar + header; don't allow ↵v0.17.1Libravatar tobi15
editing default desc (#3473)
2024-10-19[bugfix] Fix filter title unique constraint (#3458)Libravatar tobi5
2024-10-18[chore] Fix loop issue in streaming 🤦 (#3457)Libravatar tobi1
2024-10-18[chore] Thumbnail only first frame of animated media (#3448)Libravatar tobi9
2024-10-18[bugfix] Fix occasionally streaming empty messages (#3456)Libravatar tobi1
2024-10-16[chore] Upgrade golangci-lint, ignore existing int overflow warnings (#3420)Libravatar Markus Unterwaditzer20
* [chore] Bump tooling versions, bump go -> v1.23.0 * undo silly change * sign * bump go version in go.mod * allow overflow in imaging * goreleaser deprecation notices * [chore] Upgrade golangci-lint, ignore existing int overflow warnings There is a new lint for unchecked int casts. Integer overflows are bad, but the old code that triggers this lint seems to be perfectly fine. Instead of disabling the lint entirely for new code as well, grandfather in existing code. * fix golangci-lint documentation link * revert unrelated changes * revert another unrelated change * get rid of remaining nolint:gosec * swagger updates * apply review feedback * fix wrong formatting specifier thing * fix the linter for real --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-10-14updates exported interface types to match ncruces/go-sqlite3/driver methods ↵v0.17.0Libravatar kim1
(#3440)
2024-10-14[feature/OFFICIALLY UNSUPPORTED] add nowasm build tag to disable building ↵Libravatar kim12
with WebAssembly (#3429) * add experimental build-tag 'nowasm' which uses local ffmpeg / ffprobe * updated experimental support message * add comment to build script explaining build tag * add nowasm build tags to moderncsqlite files
2024-10-14[feature] for an sqlite database with journal mode != WAL, use maximum of 1 ↵Libravatar kim1
open conn (#3428)
2024-10-12[bugfix] Account.last_status_at is a date, not datetime (#3419)Libravatar Markus Unterwaditzer15
* [bugfix] Account.last_status_at is a date, not datetime Fix #3418 * update swagger
2024-10-11[chore] Don't cc Accept of likes to followers (#3417)v0.17.0-rc4Libravatar tobi2
2024-10-11[bugfix] Check interaction policies properly on incoming Likes (#3416)Libravatar tobi2
2024-10-11[bugfix] Ensure `pending_approval` set on statuses + status faves (#3415)Libravatar tobi4
* [bugfix] Ensure pending_approval set on statuses + status faves * set PendingApproval on boosts * assume not pending approval
2024-10-09[bugfix/frontend] Don't show replies to hidden parents; return 404 if no ↵v0.17.0-rc3Libravatar tobi1
"main" thread (#3411)
2024-10-09[bugfix] Fix replies not being stored pending approval (#3409)Libravatar tobi1
2024-10-08[feature] Distribute + ingest Accepts to followers (#3404)Libravatar tobi8