* [feature] Parse content warning as HTML, serialize via API to plaintext
* tidy up some cruft
* whoops
* oops
* i'm da joker baybee
* clemency muy lorde
* rename some of the text functions for clarity
* jiggle the opts
* fiddle de deee
* hopefully the last test fix i ever have to do in my beautiful life
* Add ContentType to internal models
* Add ContentType to API models StatusSource and StatusEdit
* Add helpers to convert between API/internal StatusContentType
* Write status content type on create/edit
* Add migration
* Update API docs
go run github.com/go-swagger/go-swagger/cmd/swagger generate spec --scan-models --exclude-deps --output docs/api/swagger.yaml
* ensure ContentType is updated anywhere Text is
* Update docs, take care of TODOs
* Set ContentType in more places where Text is set
* We don't actually use ContentType on the API status model
* Update StatusSource test
* Remove unused helper function I copied
* Revert change to StatusContentType swagger annotation
I'm going to include this in a follow-on PR instead.
* Add test for updating content type in edits
* Return a value from processContentType instead of modifying the existing status
Fixes an issue that was caught by the test I just added - the recorded edit would be marked with the *new* content type instead of the old one, which is obviously bad
* Add test for handling of statuses with no stored content type
* repurpose an existing test status instead of adding a new one to avoid breaking other tests
* Add test to ensure newly created statuses always have content type saved
* Do include content type on status API model actually
This is mostly important when deleting and redrafting.
The comment on `apimodel.Status.Text` implies that it's not sent except in response to status deletion, but actually this doesn't seem to be the case; it also appears to be present in responses to creations and normal fetches and stuff. So I'm treating `ContentType` the same here.
* Update new tests to check content type on API statuses
* Check content type of API statuses in all tests where text is checked
* update other api tests with status content type field
* Add test ensuring text and content type are returned when deleting a status
* Convert processContentType to free function and remove unused parameter
* check for the correct value in the deletion test
* Be explicit about this test status having an empty content type
* Use omitempty consistently on API models
* clean up the final diff a bit
* one more swagger regen for the road
* Handle nil statuses in processContentType
* Don't pass processContentType the entire edit form, it doesn't need it
* Move processContentType to common.go and use for creation as well
* Remove unused parameters to ContentTypeToAPIContentType
* [bugfix] Fix app migration
* use temporary index during migration
* create temporary index for the migration
* include local = true in temporary index
* tweak migration a bit for SPEED
* fix refreshed additional media info being ignored when force flag already set
* also update to always iterate through all additional info fields
* make similar changes for emoji, even if not necessary, just to keep in-sync
* separate enum migrations into their own individual transactions
* pee poo
* some performance tweaks and adding more comments
* batch
---------
Co-authored-by: kim <grufwub@gmail.com>
* [bugfix] Drop status indices AFTER updating visibility
* rename to status vis indices just to indicate they're only used in the statuses hook func
---------
Co-authored-by: kim <grufwub@gmail.com>
* Implement backfilling statuses thru scheduled_at
* Forbid mentioning others in backfills
* Update error messages & codes
* Add new tests for backfilled statuses
* Test that backfilling doesn't timeline or notify
* Fix check for absence of notification
* Test that backfills do not cause federation
* Fix type of apimodel.StatusCreateRequest.ScheduledAt in tests
* Add config file switch and min date check
* updates the enum migration to perform a singular update for all values, using an SQL case statement
* fix logging
* fix code comment
* well i guess we'll get rid of the useful but unused function then, linter. fine, i see how it is!
* append to byte buffer instead of WriteString() to shut the linter up (i know you're reading this, linter)
* Stub out account's Group parameter
* Fix typo in Contributing documentation
* Update swagger and match style
* Update the swagger command to mimic test/swagger.sh
* Fix tests for new `group` param in Account model
* More test changes for new `group` param in Account
* Continuing test changes for `group` param stubbing
* Another round of `group` stubbing for tests
* Web Push: add policy column to subscriptions
* Web Push: add policy to API
* Web Push: test notification policy
* go-fmt unrelated file (how did this get thru?)
webpush-go now supports sending `https://` as well as `mailto:` URLs for VAPID sub claims, so we can revert 464d920cfd now and save fetching the instance contact email or making up a dummy email if there wasn't one configured.
* Allow marks after NFC normalization
Includes regression test for the Tamil example from #3618
* Disallow just numbers + marks + underscore as hashtag