Commit graph

1,281 commits

Author SHA1 Message Date
kim
d1db703e5b flesh out more of the dereferencer status edit tests, ensure updated at field set on outgoing AS statuses 2024-12-03 15:25:55 +00:00
kim
f4f5e8b5aa don't automatically set updated_at field on updated statuses 2024-12-03 15:25:55 +00:00
kim
ca809d8cc0 add test for deleting status edits 2024-12-03 15:25:55 +00:00
kim
c913f604bf fix panic wording 2024-12-03 15:25:55 +00:00
kim
4dd9c00cac fix tests now new models are added, add more status edit DB tests 2024-12-03 15:25:55 +00:00
kim
f9a393d6ab actually remove the Mention.UpdatedAt field... 2024-12-03 15:25:55 +00:00
kim
0c808ecb8d use model instead of table name 2024-12-03 15:25:55 +00:00
kim
bb862b54bd fix new statusedits sql 2024-12-03 15:25:55 +00:00
kim
63ddeb0879 add StatusEdit{} test models 2024-12-03 15:25:55 +00:00
kim
aa7191eb52 remove unused function 2024-12-03 15:25:55 +00:00
kim
305c50b037 add more of status edit migrations, fill in more of the necessary edit delete functionality 2024-12-03 15:25:55 +00:00
kim
20e20feae0 start adding tests, add delete function for status edits 2024-12-03 15:25:55 +00:00
kim
cf707893cc add migration to add the StatusEdit{} table 2024-12-03 15:25:55 +00:00
kim
3f89258660 add migration to remove Mention{}.UpdatedAt field 2024-12-03 15:25:55 +00:00
kim
80cc0b165c remove mention.UpdatedAt, fixes related to NewULIDFromTime() change 2024-12-03 15:25:55 +00:00
kim
a449781152 update new mention creation to use status.UpdatedAt 2024-12-03 15:25:55 +00:00
kim
3c90e2dd76 remove unused AdditionalEmojiInfo{}.CreatedAt 2024-12-03 15:25:55 +00:00
kim
681927fa34 remove unused AdditionalInfo{}.CreatedAt 2024-12-03 15:25:55 +00:00
kim
3e131f5da6 add support for status edits in the database, and update status dereferencer to handle them 2024-12-03 15:25:55 +00:00
kim
fc8d3742c9 add support for extracting Updated field from Statusable implementers 2024-12-03 15:25:55 +00:00
CDN
732b03a742
[bugfix] Load instance-wide custom css unconditionally in thread details page (#3595) 2024-12-03 15:21:47 +01:00
Victor Dyotte
9609c4550d
[feature] Add global instance CSS customization setting (#3352)
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-12-02 12:24:48 +01:00
kim
c9d36f7e45
[performance] use new instance of bun.DB *after* migrations to reduce number 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-29 15:03:10 +00:00
kim
d9f67efae5
send out poll votes as separate create activities given that no other AP servers support multiple objects in a single activity (#3582) 2024-11-28 15:37:37 +00:00
kim
312cb8b9c7
[chore] rename New___(string) int signature functions to Parse___(string) int (#3580)
* rename New___(string) int {} signature functions to Parse___(string) int {}

* remove test output
2024-11-28 12:54:22 +01:00
tobi
65917f5bb9
[bugfix] Log + ignore unknown notification types (#3577)
* [bugfix] Log + ignore unknown notification types

* pass context to ParseNotificationTypes
2024-11-27 17:22:45 +00:00
Vyr Cossont
6a8af42647
[bugfix] Allow unsetting filter expiration dates (#3560)
* 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-26 08:23:00 -08:00
kim
a444adee97
[bugfix] notification types missing from link header (#3571)
* ensure notification types get included in link header query for notifications

* fix type query keys
2024-11-25 15:33:21 +00:00
tobi
c454b1b488
[chore] Bump tooling versions, bump go -> v1.23.0 (#3258)
* [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 16:15:33 +01:00
kim
cac9d65029
[performance] convert enum strings to ints (#3558)
* 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-25 14:48:59 +01:00
tobi
301543616b
[feature] Add domain permission drafts and excludes (#3547)
* [feature] Add domain permission drafts and excludes

* fix typescript complaining

* lint

* make filenames more consistent

* test own domain excluded
2024-11-21 13:09:58 +00:00
tobi
c2029df9bc
[feature] Allow emoji shortcode to be 1-character length (#3556)
* [feature] Allow emoji shortcode to be 1-character length

* testerino fixeroni

* spaghet
2024-11-21 12:13:55 +01:00
Jannis
9ace025da1
[bugfix] post counters should not include direct messages (#3554)
* [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-21 11:06:06 +01:00
kim
e3c2b790fd
[performance] minimise log field allocations (#3529)
* 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-11 15:45:19 +00:00
kim
b84637801a
[chore] update go ffmpreg to v0.6.0 (#3515)
* pull in go-ffmpreg v0.6.0

* add code comment

* grrr linter

* set empty module name when calling ffmpeg / ffprobe
2024-11-06 14:38:13 +01:00
kim
6f4cb2f14e
[bugfix] sets the max value placeholders to MaxInt32 instead of MaxInt (#3517)
* sets the max value placeholders to MaxInt32 instead of MaxInt

* update tests
2024-11-05 22:16:06 +00:00
tobi
e953d80dff
[bugfix] Fix setting immediate expires_at value on filter endpoints (#3513)
* [bugfix] Fix setting immediate `expires_at` value on filter endpoints

* update wording

* update wording

* oh my
2024-11-05 13:29:51 +01:00
kim
53aaeb18d4
previously we were using the ffmpeg runner for ffprobe 🤦 (#3512) 2024-11-05 10:50:56 +00:00
kim
f3b2eca8b8
[feature] add support for hinting via api/v_/instance preferred image / 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 15:00:10 +01:00
kim
8f288f1689
[bugfix] determine mime-type to use during ffprobe evaluation stage, don't 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-11-04 14:58:15 +01:00
kim
7ec6509e11
[bugfix] support classifying correct video codec without audio as webm (#3494)
* for webm support video:[vp8,vp9,av1] and audio:[NONE,vorbis,opus]

* improved unsupported data type error output
2024-10-28 14:09:21 +01:00
kim
e86592bc32
[chore] pull in go-ffmpreg v0.4.1 (#3485)
* pull in go-ffmpreg v0.4.1

* bring back GTS_WAZERO_COMPILATION_CACHE
2024-10-28 10:55:48 +00:00
kim
d8a83860bc
[bugfix] incorrect /api/v_/instance domain uri fields (#3477)
* update instance v1 / v2 endpoints to set uri / domain correctly (i.e. account domain)

* fix tests relying on old instance behaviour
2024-10-22 14:47:28 +00:00
tobi
8a93300ac4
[feature] Add image descriptions for default avatar + header; don't allow editing default desc (#3473) 2024-10-21 14:04:50 +02:00
tobi
fab7d17031
[bugfix] Fix filter title unique constraint (#3458) 2024-10-19 11:04:07 +02:00
tobi
0d0314b98d
[chore] Fix loop issue in streaming 🤦 (#3457) 2024-10-18 16:57:50 +02:00
tobi
602c858379
[chore] Thumbnail only first frame of animated media (#3448) 2024-10-18 15:44:08 +02:00
tobi
ffc86f9092
[bugfix] Fix occasionally streaming empty messages (#3456) 2024-10-18 15:43:09 +02:00
Markus Unterwaditzer
a48cce82b9
[chore] Upgrade golangci-lint, ignore existing int overflow warnings (#3420)
* [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-16 14:13:58 +02:00
kim
3ad49f7718
updates exported interface types to match ncruces/go-sqlite3/driver methods (#3440) 2024-10-14 20:28:59 +00:00