26 Commits

Author SHA1 Message Date
d414b56344
fix(backend): fix minio settings (#8878)
* fix minio settings

* remove port exposure on 9000
2025-09-15 09:20:09 +00:00
ebb8ef4f0e
remove PRIVATE_KEY_PASSPHRASE from config and remove its requirement (#8889) 2025-09-13 10:04:45 +00:00
Robert Schäfer
00da9e8ecb
feat(backend): resize images with imagor (#8558)
* feat(backend): resize images with imagor

Open questions:
* Do we have external URLs for images? E.g. we have them for seeds. But
  in production?

* Do we want to apply image transformations on these as well? My current
implementation does not apply image transformations as of now. If we
want to do that, we will also expose internal URLs in the kubernetes
Cluster to the S3 endpoint to the client.

TODOs:
* The chat component is using a fixed size for all avatars at the moment.
Maybe we can pair-program on this how to implement responsive images in
this component library.

Commits:
* do not replace upload domain url in the database

* fix all webapp specs

* refactor: remove behaviour we won't need

We don't want to apply image transformations on files, right?

* refactor: replace the domain on read not on write

* wip: webapp fixes

* refactor(backend): add another url to config

I've given up. There seems to be no nice way to tell the minio to return
a location which differs from it's host name.

* refactor: add test for s3Service

* refactor(backend): proxy minio via backend in local development

Commits:
* provide tests for message attachments
* remove S3_PUBLIC_URL config value

* refactor: follow @ulfgebhardt's review

* add missing environment variable

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-08-19 10:11:12 +02:00
Robert Schäfer
3b2b3f0014
refactor(backend): remove obsolete code (#8752)
We kept this code for backwards compatibility but since we already deployed S3 to our kubernetes cluster and we're using it locally, let's remove this code. It will also make it easier to implement the image resize service as it reduces the total amount of code to maintain.

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-07-14 07:28:07 +00:00
Robert Schäfer
61813c4eb8
refactor(backend): put config into context (#8603)
This is a side quest of #8558. The motivation is to be able to do dependency injection in the tests without overwriting global data. I saw the first merge conflict from #8551 and voila: It seems @Mogge could have used this already.

refactor: follow @Mogge's review

See: https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/8603#pullrequestreview-2880714796

refactor: better test helper methods

wip: continue refactoring

wip: continue posts

continue

wip: continue groups

continue registration

registration

continue messages

continue observeposts

continue categories

continue posts in groups

continue invite codes

refactor: continue notificationsMiddleware

continue statistics spec

followed-users

online-status

mentions-in-groups

posts-in-groups

email spec

finish all tests

improve typescript

missed one test

remove one more reference of CONFIG

eliminate one more global import of CONFIG

fix language spec test

fix two more test suites

refactor: completely mock out 3rd part API request

refactor test

fixed user_management spec

fixed more locatoin specs

install types for jsonwebtoken

one more fetchmock

fixed one more suite

fix one more spec

yet another spec

fix spec

delete whitespaces

remove beforeAll that the same as the default

fix merge conflict

fix e2e test

refactor: use single callback function for `context` setup

refactor: display logs from backend during CI

Because why not?

fix seeds

fix login

refactor: one unnecessary naming

refactor: better editor support

refactor: fail early

Interestingly, I've had to destructure `context.user` in order to make
typescript happy. Weird.

refactor: undo changes to workflows - no effect

We're running in `--detached` mode on CI, so I guess we won't be able to
see the logs anyways.

refactor: remove fetch from context after review

See:

refactor: found an easier way for required props

Co-authored-by: Max <maxharz@gmail.com>
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-07-03 11:58:03 +02:00
d7d8a242cd
fix(backend): fixes for branding (#8449)
* copy from branding folder to backend public folder

provide default branding/public folder

* copy public folder correctly

* copy files again for providers.json

* copy more public folders

* more copy

* revert change

* fix naming of called script when using db:data:branding

* prod command for branding data

* close database connection

* lint fixes

* increase test timeout again
2025-04-28 18:17:18 +02:00
0873fc748c
feat(backend): lint - detect unused typescript disables (#8425)
* detect unused typescript disables

* fix lint errors

uuid-types

remove debug

fix config

* lint fixes
2025-04-25 14:31:49 +00:00
2369d13ca2
lint everything, disable some setup steps for jest (#8423) 2025-04-24 22:39:32 +02:00
c063682560
remove activity pub related stuff - since its unused 2023-06-20 18:39:43 +02:00
09ef532838
converted two more js files to ts 2023-06-15 13:57:29 +02:00
3f7f3c2651
"fix" decoder 2023-06-13 14:22:25 +02:00
f1203a76db
fix missing file ending 2023-06-12 14:40:06 +02:00
ecc7b2ad91
"fix" failing test 2023-01-28 03:46:59 +01:00
d9a428730c
polyfill Encoders to run tests 2023-01-27 20:00:01 +01:00
mattwr18
0f74273b5b Let post factory create default category
- since we have factories that ensure a post has a category created, we
  don't need extra code to create a category before the post
2020-02-18 10:36:34 +01:00
roschaefer
fa0e64b7cb Merge remote-tracking branch 'origin/master' into refactor_factories_with_rosie
There was a single step definition that created a post and a comment. I
would say let's put that in two different steps.
2020-02-01 13:33:07 +01:00
roschaefer
fc367297e3 Get rid of different factory files
..and fix some cypress tests
2020-01-28 23:12:50 +01:00
roschaefer
2a79c53765 Refactor user factory 2020-01-28 22:43:26 +01:00
roschaefer
b063847849 refactor: Make db:setup init stage of migrate 2020-01-20 11:00:52 +01:00
roschaefer
7c6d5b5129 fix: Re-enable webfinger feature
Ok, so here is the plan. Let's give both our cucumber features and your
cypress tests a prominent place to live. That would be the root level
folder of our application. Second, let's revive formerly dead code step
by step.

Ie. move code from the former location `backend/features/` to `features/`
when it is ready. All edge cases should be tested with unit tests in
`backend/`, see my `webfinger.spec.js` as an example.
2019-12-02 17:31:56 +01:00
roschaefer
978347ba7b Tell github-linguists to ignore snapshots 2019-11-16 20:09:05 +01:00
Robert Schäfer
0fc7061333 Disable broken cucumber tests for now
@Mastercuber the justification for simply disabling the tests is that
the entire implemntation for the follow activities is wrong. It's still
using the `AddUserFollowedBy` auto-generated mutation. The mutation that
is actually used when you do a follow or unfollow are called `follow`
and `unfollow` - these are custom mutations implemented by ourselves.

So the proper fix for these tests would be to refactor the entire
ActivityPub implementation. Since there is a pending PR already I
decided not to go down the rabbit hole and simply tag the failing
sceario as "work-in-progress" (@wip).
2019-06-14 11:33:32 +02:00
Robert Schäfer
b78296a546 Fix cucumber features 2019-03-26 01:28:32 +01:00
Robert Schäfer
46c0d0659a Fix routing/proxying of AP, works locally
RSA keys get seeded but not for tests
2019-03-26 01:24:52 +01:00
Armin
b6b8f073b8 Second fix 2019-03-25 13:50:34 +01:00
Robert Schäfer
7a72185c9e Merging backend to master 2019-03-20 21:00:59 +01:00