summaryrefslogtreecommitdiff
path: root/internal/processing
AgeCommit message (Collapse)AuthorFiles
2022-02-22[feature] Add postDataCallbackFunc to allow cleanup (#408)Libravatar tobi3
2022-02-19[feature] Stream files via reader (#404)Libravatar tobi1
* serve files via reader rather than byte slice * close readcloser when we're done with it * cast reader to readcloser
2022-02-08merge fixupLibravatar tsmethurst1
2022-02-08Merge branch 'main' into media_refactorLibravatar tsmethurst9
2022-02-07[feature] add authorization to the already-existing authentication (#365)Libravatar Forest Johnson1
* add ensureUserIsAuthorizedOrRedirect to /oauth/authorize * adding authorization (email confirm, account approve, etc) to TokenCheck * revert un-needed changes to signin.go * oops what happened here * error css * add account.SuspendedAt check * remove redundant checks from oauth util Authed function * wip tests * tests passing * stop stripping useful information from ErrAlreadyExists * that feeling of scraping the dryer LINT off the screen * oops I didn't mean to get rid of this NewTestRouter function * make tests work with recorder * re-add ConfigureTemplatesWithGin to handle template path err Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2022-02-06if accountDomain isn't set, use Host value instead (#380)Libravatar tobi1
2022-02-05[feature] Rework timeline code to make it useful for more than just statuses ↵Libravatar tobi6
(#373) * add preparable and timelineable interfaces * initialize timeline manager within the processor * generic renaming * move status-specific timeline logic into the processor * refactor timeline to make it useful for more than statuses
2022-01-31[bug] Send plaintext emails to fix "message refused: Message is not RFC 2822 ↵Libravatar Forest Johnson1
compliant" (#366) * trying to fix "message refused: Message is not RFC 2822 compliant" * fix "message refused: Message is not RFC 2822 compliant" 550 5.7.1 Delivery not authorized, message refused: Message is not RFC 2822 compliant * remove silly regex * lint * fix tests * we should use text/template instead of html/template now
2022-01-25ensure blocking calls to getRemoteAccount before showing stuff to clientLibravatar tsmethurst1
2022-01-24ctx => innerctxLibravatar tsmethurst1
2022-01-24update remote account get/deref logicLibravatar tsmethurst9
2022-01-23rework data function to provide filesizeLibravatar tsmethurst3
2022-01-16pass reader around instead of []byteLibravatar tsmethurst3
2022-01-15emoji code passing musterLibravatar tsmethurst4
2022-01-15start fixing up emoji processing codeLibravatar tsmethurst1
2022-01-11pass a function into the manager, start work on emojiLibravatar tsmethurst3
2022-01-10test the media manager a bit, add shutdown logicLibravatar tsmethurst4
2022-01-09tests are passing, but there's still much to be doneLibravatar tsmethurst3
2022-01-08compiling nowLibravatar tsmethurst3
2022-01-08further refinementsLibravatar tsmethurst1
2021-12-28more refactoring, media handler => managerLibravatar tsmethurst9
2021-12-20Extend license notices to 2022 (#354)Libravatar tobi92
2021-12-20Remove unnecessary storage config variables (#344)Libravatar tobi9
* rewire config to not use extraneous serve vars * rename 'file' to 'local' for consistency * use Type and Size again
2021-12-07Implement Cobra CLI tooling, Viper config tooling (#336)Libravatar tobi26
* start pulling out + replacing urfave and config * replace many many instances of config * move more stuff => viper * properly remove urfave * move some flags to root command * add testrig commands to root * alias config file keys * start adding cli parsing tests * reorder viper init * remove config path alias * fmt * change config file keys to non-nested * we're more or less in business now * tidy up the common func * go fmt * get tests passing again * add note about the cliparsing tests * reorganize * update docs with changes * structure cmd dir better * rename + move some files around * fix dangling comma
2021-11-22Fix streamed messages ending up in wrong timeline(s) (#325)Libravatar tobi9
* define timeline consts * remove double stream of status * change test stream creation up a bit * stream messages more selectively * add test for streaming new status creation via clientAPI * tidy code + comments a bit * tidy up tests * make sure new status isn't streamed to public
2021-11-22Fix image description unnecessarily html-escaping innocent characters (#321)Libravatar tobi2
* implement SanitizeCaption function * tidy up text test setup
2021-11-22Enable stricter linting with golangci-lint (#316)Libravatar tobi5
* update golangci-lint * add golangci config file w/ more linters * correct issues flagged by stricter linters * add more generous timeout for golangci-lint * add some style + formatting guidelines * move timeout to config file * go fmt
2021-11-13move to ssb gofed fork (#298)Libravatar tobi9
2021-11-13update dependencies (#296)Libravatar tobi4
2021-10-31smtp + email confirmation (#285)Libravatar tobi10
* add smtp configuration * add email confirm + reset templates * add email sender to testrig * flesh out the email sender interface * go fmt * golint * update from field with more clarity * tidy up the email formatting * fix tests * add email sender to processor * tidy client api processing a bit * further tidying in fromClientAPI * pin new account to user * send msg to processor on new account creation * generate confirm email uri * remove emailer from account processor again * add processCreateAccountFromClientAPI * move emailer accountprocessor => userprocessor * add email sender to user processor * SendConfirmEmail function * add noop email sender * use noop email sender in tests * only assemble message if callback is not nil * use noop email sender if no smtp host is defined * minify email html before sending * fix wrong email address * email confirm test * fmt * serve web hndler * add email confirm handler * init test log properly on testrig * log emails that *would* have been sent * go fmt ./... * unexport confirm email handler * updatedAt * test confirm email function * don't allow tokens older than 7 days * change error message a bit * add basic smtp docs * add a few more snippets * typo * add email sender to outbox tests * don't use dutch wikipedia link * don't minify email html
2021-10-24Serve `outbox` for Actor (#289)Libravatar tobi18
* add statusesvisible convenience function * add minID + onlyPublic to account statuses get * move swagger collection stuff to common * start working on Outbox GETting * move functions into federationProcessor * outboxToASCollection * add statusesvisible convenience function * add minID + onlyPublic to account statuses get * move swagger collection stuff to common * start working on Outbox GETting * move functions into federationProcessor * outboxToASCollection * bit more work on outbox paging * wrapNoteInCreate function * test + hook up the processor functions * don't do prev + next links on empty reply * test get outbox through api * don't fail on no status entries * add outbox implementation doc * typo
2021-10-17fix mention extracting when no domain exists (usually intra-instance ↵Libravatar kim1
mentions) (#272) * fix mention extracting when no domain exists (usually when intra-instance mentions) Signed-off-by: kim <grufwub@gmail.com> * fix search logic to match new mention matching logic Signed-off-by: kim <grufwub@gmail.com> * appease the linter :p Signed-off-by: kim <grufwub@gmail.com>
2021-10-16Follow request improvements (#282)Libravatar tobi6
* tiny doc update * add rejectfollowrequest to db * add follow request reject to processor * add reject handler * tidy up follow request api * tidy up federation call * regenerate swagger docs * api endpoint tests * processor test * add reject federatingdb handler * start writing reject tests * test reject follow request * go fmt * increase sleep for slow test setups * more relaxed time.sleep
2021-10-14User password change (#280)Libravatar tobi6
* start passwordChangeHandler * add user scope * add user module / api path * add password change request * make comment clearer * add user to processor * required true * add processor call to handler * don't pass tc or channel * change password func + tests * add some first docs about password management * update swagger docs * add api tests * go fmt * test fixes
2021-10-11reference global logrus (#274)Libravatar R. Aidan Campbell20
* reference logrus' global logger instead of passing and storing a logger reference everywhere * always directly use global logrus logger instead of referencing an instance * test suites should also directly use the global logrus logger * rename gin logging function to clarify that it's middleware * correct comments which erroneously referenced removed logger parameter * setting log level for tests now uses logrus' exported type instead of the string value, to guarantee error isn't possible
2021-10-10Handle forwarded messages (#273)Libravatar tobi3
* correct path of foss_satan * add APIri and notes * test create forward note * rename target => receiving account * split up create into separate funcs * update extractFromCtx * tidy up from federator processing * foss satan => http not https * check if status in db * mock dereference of status from IRI * add forward message deref test * update test with activities * add remote_account_2 to test rig
2021-10-04Refactor/tidy (#261)Libravatar tobi49
* tidy up streaming * cut down code duplication * test get followers/following * test streaming processor * fix some test models * add TimeMustParse * fix uri / url typo * make trace logging less verbose * make logging more consistent * disable quote on logging * remove context.Background * remove many extraneous mastodon references * regenerate swagger * don't log query on no rows result * log latency first for easier reading
2021-10-01Follow request auto approval (#259)Libravatar tobi5
* start messing about * fiddle more * Tests & fiddling
2021-09-30handle remote account deletion more systematically (#254)Libravatar tobi4
2021-09-28Account update issue (#250)Libravatar tobi1
* start poking around * tests * notes and fiddling
2021-09-27Weird notif issue (#248)Libravatar tobi4
* start working on weird issue * go fmt ./... * more tests
2021-09-20Update webfingering a little, add tests (#236)Libravatar tobi2
* Update webfingering a little, add tests * fix broken tests oops
2021-09-14Fix mentions not notifying (#230)Libravatar tobi3
* set default privacy for new accounts * teshts * found it * tiny change * aaaa
2021-09-11rename KVStore uses as storage to differentiate between upcoming store packageLibravatar kim (grufwub)5
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2021-09-11add git.iim.gay/grufwub/go-store for storage backend, replacing blob.StorageLibravatar kim (grufwub)6
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2021-09-11kim is a reply guy (#208)Libravatar tobi4
* bun debug * bun trace logging hooks * more tests * fix up some stuffffff * drop the frontend cache until a proper fix is made * go fmt
2021-09-10fixes + db changes (#204)Libravatar tobi7
* fixes + db changes * make duration more lenient
2021-09-09Import export (#194)Libravatar tobi4
* start with export/import code * messing about with decoding/encoding * some more fiddling * stuff is WORKING * working pretty alright! * go fmt * fix up tests, add docs * start backup/restore doc * tweaks * credits * update advancedVisibility settings * update bun library -> v1.0.4 Signed-off-by: kim (grufwub) <grufwub@gmail.com> * update oauth library -> v4.3.1-SSB Signed-off-by: kim (grufwub) <grufwub@gmail.com> * handle oauth token scope, fix user.SigninCount + token.UserID Signed-off-by: kim (grufwub) <grufwub@gmail.com> * update oauth library --> v4.3.2-SSB Signed-off-by: kim (grufwub) <grufwub@gmail.com> * update sqlite library -> v1.13.0 Signed-off-by: kim (grufwub) <grufwub@gmail.com> * review changes * start with export/import code * messing about with decoding/encoding * some more fiddling * stuff is WORKING * working pretty alright! * go fmt * fix up tests, add docs * start backup/restore doc * tweaks * credits * update advancedVisibility settings * review changes Co-authored-by: kim (grufwub) <grufwub@gmail.com> Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
2021-09-04rework media processing a little bit (#191)Libravatar tobi1
* rework media processing a little bit * review changes
2021-09-04tests + announce notification fix (#193)Libravatar tobi7