2193 Commits

Author SHA1 Message Date
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
e0719c405e
refactor(backend): use apollo test setup (#8750)
.. in two more specs.

Apparently this got overlooked. In #8558 these tests will fail.
2025-07-07 20:46:34 +07: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
Moriz Wahl
8ae4e309c3
fix(backend): mask jwt token in log (#8737) 2025-07-01 14:41:45 +02:00
Robert Schäfer
c9b429878a
refactor(backend): fix tests for #8714 (#8716)
This fixes the tests for #8714.

The Images type now has the callbacks only for backwards compatibility with local uploads. Next step is to remove the obsolete code and make S3 configuration parameters required.
2025-06-30 10:18:21 +00:00
Max
32927ea96e
fix(backend): refactor S3 usage and always apply protocol fix (#8714)
- Cleanup s3 code, so we use the same code for uploading files in chat and images in posts.
- Protocol is added to the location, when missing
2025-06-30 11:59:57 +02:00
Moriz Wahl
f3788b84a5
feat(backend): all db node properties (#8635)
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-06-25 21:21:41 +02:00
Moriz Wahl
4eff0fb497
fix(webapp): catch possibe errors on request geolocation (#8640)
* catch possibe errors on request geolocation

* proper toast error

* remove deprecated request package, use node fetch instead, set timeout

---------

Co-authored-by: Max <maxharz@gmail.com>
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-06-25 17:45:46 +00:00
Max
cc96698300
Put message creation in a transaction with file uploads to avoid empty messages (#8694)
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-06-20 18:32:00 +00:00
Moriz Wahl
3216b50d1a
feat(backend): logger (#8655)
* add logger to context

* add apollo logger

* apollo logger plugin must be set on createServer to avoid spam in unit tests
2025-06-19 12:59:15 +00:00
Max
d656ac00a1
Add protocol if missing (#8689)
Apparently Hetzner returns locations without protocol. So we add it if necessary.
2025-06-19 12:43:06 +02:00
a0c205b379
feat(backend): file upload chat backend (#8657)
* Prepare image uploads in chat

* files instead of images

* Fix file type and query

* Add dummy data to resolver

* fix graphql types

* Fix file upload, remove unncessary code

* Re-add fetch

* Fix room order after sent message

* Update backend/src/graphql/queries/messageQuery.ts

* Move room to top of list when a message is received

* working prototype chat file upload

* remove console

* allow to upload all kinds of files

* multiple images

* revert changes in S3 Images

* tag mimetype

* accept any file

* lint fix

* remove snapshot flakyness

* remove whitelist test

* fix messages spec

* fix query

* more query fixes

* fix seed

* made message resolver tests independent

* lint

* started specc for attachments

* more tests & fixes

* fix empty room error

* remove console logs

* fix tests

* fix createRoom last Messsage error properly

* lint fixes

* reduce changeset

* simplify config check

* reduce changeset

* missing change

* allow speech capture

* Fix file download

* Implement proper download

---------

Co-authored-by: Maximilian Harz <maxharz@gmail.com>
2025-06-13 19:02:37 +00:00
e6d3e5132e
refactor(backend): reduce seed time (#8662)
* reduce seed time

- only 1000 additional users
- chat only for 100 additional users
- logs to see where its at

* lint
2025-06-13 10:57:49 +00:00
a0e4b49833
fix(webapp): fix group performance (#8656)
* seed more Yoga group members

* implement groupMembers pagination

* load limited amount of group members

* force show all members in group member list

* remove unused import

* - added virtual scrolling to ProfileList

* - fixed linter error

* load all when clicking the button

* seed 3000 users

* cleanup

* lint

* hide search when not all members are visible

* fix email factory

* - increased profileListVisibleCount to 6

---------

Co-authored-by: Sebastian Stein <sebastian@codepassion.de>
2025-06-11 17:46:57 +02:00
aaf3b34125
fix flaky tests (#8638) 2025-06-04 23:40:48 +02:00
Moriz Wahl
df4275c5cd
feat(webapp): location on registration (#8608)
* feat(webapp): location on registration

* add location name to signup verification, allow location query

* location name can be prompted in regeistration

* default value null for locationName

* Prevent ds-select overflow

* Remove location name from label

* Add margin-bottom to location-select

* group location is not affected by REQUIRE_LOCATION, previous location is shown

* Update webapp/components/Registration/RegistrationSlideCreate.vue

Co-authored-by: Max <maxharz@gmail.com>

* Replace more '16px' by '$space-small' and remove class 'password-strength'

* Add class 'password-strength' again

* property for previous location

---------

Co-authored-by: Maximilian Harz <maxharz@gmail.com>
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-06-04 15:16:24 +02:00
e87a33eb3f
feat(backend): push posts (#8609)
* push posts

push posts

* unpush posts

* fix comment query

* locales

* fix locales

* fix tests

* Update webapp/locales/de.json

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>

* Update webapp/locales/de.json

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>

* Update webapp/locales/de.json

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>

* fix unpushedSuccessfully english message

* remove paremeters from unpushPost

* rename pushPostToTop -> pushPost, tests

* update locales & tests webapp

* fix lint

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-06-03 17:57:21 +02:00
b4b9b842b3
fix(backend): hotfix - allow more user fields to be queried (#8632)
* allow to query user id & slug

* skip tests
2025-06-02 08:50:42 +00:00
Robert Schäfer
d6a8de478b
feat(backend): migrate to s3 (#8545)
## 🍰 Pullrequest
This will migrate our assets to an objectstorage via S3.

Before this PR is rolled out, the S3 credentials need to be configured in the respective infrastructure repository. The migration is implemented in a backend migration, i.e. I expect the `initContainer` to take a little longer but I hope then it's going to be fine. If any errors occcur, the migration should be repeatable, since the disk volume is still there.

### Issues
The backend having direct access on disk.

### Todo
- [ ] Configure backend environment variables in every infrastructure repo
- [ ] Remove kubernetes uploads volume in a future PR

Commits:

* refactor: follow @ulfgebhardt
  Here: https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/8545#pullrequestreview-2846163417
  I don't know why the PR didn't include these changes already, I believe I made a mistake during rebase and lost the relevant commits.
* refactor: use typescript assertions
  I found it a better way to react to this comment: https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/8545/files#r2092766596
* add S3 credentials
* refactor: easier to remember credentials
  It's for local development only
* give init container necessary file access
* fix: wrong upload location on production
* refactor: follow @ulfgebhardt's review
  See: https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/8545#pullrequestreview-2881626504
2025-06-01 09:53:31 +00:00
4b3a26d517
feat(webapp): shout comments (#8600)
* shout comments

* fix notifications

* Remove whitespace for empty category sections

* Overhaul post actions

* Adjust spacing

* Allow fine-grained size control for icons and circle buttons via css variables; adjust comments layout

* Adjust spacing

* Add test for ActionButton (WIP)

* Rename import

* Remove text and add count bubble

* Use filled icons to indicate active states

* Adjust sizes and orientation

* Remove unused properties, add test

* Fix ObserveButton test

* Fix ShoutButton test

* fix tests

* Adapt styles

* Adjust style for larger numbers

* Remove unused icon

* Fix test structure

* Remove unused class names

---------

Co-authored-by: Maximilian Harz <maxharz@gmail.com>
2025-05-31 00:13:15 +02:00
Moriz Wahl
fb2ef852a1
feat(backend): pin public group posts (#8606)
* feat(backend): pin more than one post

* add postPinnedCount query, better names for env variable

* add store and mixin for pinned posts counts

* test pinned post store

* context menu for pin posts

* fix typos

* unpin posts is always possible

* feat(backend): pin public group posts

* allow posts in public groups to be pinned by admins

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-28 19:52:30 +02:00
Moriz Wahl
b736a2a2e3
feat(backend): pin more than one post (#8598)
* feat(backend): pin more than one post

* add postPinnedCount query, better names for env variable

* add store and mixin for pinned posts counts

* test pinned post store

* context menu for pin posts

* fix typos

* unpin posts is always possible

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-28 19:12:27 +02:00
Moriz Wahl
a3178a91b4
refactor(webapp): store for categories (#8551)
* after authentification, query the categories if active and store them

* get categories from store

* use category store to get categories

* get categories from store

* mock store to have access to categories

* to get rid of the active categories config variable in the frontend, the Category query returns an empty array when categories are not active

* remove CATEGORIES_ACTIVE from .env

* should return string to avoid warnings in console

* replace all env calls for categories active by getter from store

* use categoriesActive getter

* ignore order of returned categories

* mixin to get the category infos from the store, to ensure, that the quey has been called

* fix misspelling

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-27 15:03:26 +02:00
sebastian2357
eef2eb9c56
fix(webapp): logo and top-menu optimization (#8590)
* - added case for tablet

* - optimized HeaderMenu for desktop and mobile
- fixed Logo

* - refixed Logo (missing changes)

---------

Co-authored-by: Sebastian Stein <sebastian@codepassion.de>
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-25 17:43:01 +00:00
ad4b6e0d79
refactor(webapp): remove email normalization (#8580)
* remove email normalization from webapp

* missing change

* fix error when email is not defined

* fix lint

* remove obsolete test

* remove obsolete tests

* fix password reset

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-25 15:58:41 +02:00
2b0d38fdff
feat(backend): autoselect badges when rewarding and the user still have free slots (#8577)
* autoselect badges when rewarding and the suer still have free slots

* improve semantics

---------

Co-authored-by: Hendrik-cpu <62690517+Hendrik-cpu@users.noreply.github.com>
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-25 14:43:38 +02:00
Robert Schäfer
497dabdef9
build(backend): upgrade outdated S3 client (#8463)
I think we can merge this already. The S3 client dependency is outdated
and since the code is behind a feature flag it doesn't get executed. Why
not merge it then?
2025-05-22 14:29:17 +00:00
Moriz Wahl
35729dfb6a
fix(backend): user role in group in notifications (#8552)
Co-authored-by: Max <maxharz@gmail.com>
2025-05-20 06:54:10 +00:00
a9ac75cf0c
fix statistics: reports (#8576) 2025-05-19 11:24:24 +00:00
Moriz Wahl
77cd6a4a04
feat(backend): add support line to emails (#8502)
* feat(backend): add support line to emails

* - fixed snapshots

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
Co-authored-by: Sebastian Stein <sebastian@codepassion.de>
2025-05-14 18:04:08 +02:00
34c0e5166f
fix(backend): fix statistics and introduce new values (#8550)
* fix statistics and introduce new values

* fix locales
2025-05-12 17:51:15 +00:00
995afaaab5
feat(webapp): default language configurable (#8546)
* make the default and fallback language configurable

* fixes

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-12 11:22:31 +00:00
Moriz Wahl
d4a9694657
feat(webapp): redirect to group after registration with invite to group (#8540) 2025-05-10 10:10:55 +00:00
Moriz Wahl
fcd1776f21
fix(backend): category seed (#8536)
* seed categories with given id
2025-05-10 09:59:50 +02:00
sebastian2357
ff366a4075
fix(webapp): mobile optimization (#8516)
* - optimized header
- added possibility of extra mobile logo

* - changed behavior of NotificationMenu link get directly open for mobile

* - moved notification links to the top of the menu

* - optimized chat view for mobile

* - added logo branding structure

* - added logo branding structure

* - fixed chat height

* - fixed paddings for internal pages

* Fix linting

* Fix linting

---------

Co-authored-by: Sebastian Stein <sebastian@codepassion.de>
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-09 17:04:06 +00:00
Wolfgang Huß
b471a8f92b
fix(backend): fix user profile and group links in e-mails (#8512)
* Add e-mail .env settings

* Fix user profile and group links

* fix snapshots

---------

Co-authored-by: Moriz Wahl <moriz.wahl@gmx.de>
2025-05-09 11:51:21 +00:00
2278a9e311
fix(backend): fix registration with invite code (#8513)
* fix registration with invite code

* save one db call

* fix
2025-05-09 11:20:56 +00:00
989d5ff781
fix(backend): invite codes - hotfix 1 (#8508)
* hotfix invite codes

* fix tests & ensure correct behaviour
2025-05-08 22:57:55 +00:00
Moriz Wahl
fbec8288b2
refactor(backend): category seed (#8505)
* define ids and slugs in categories, check for existing ids, only seed the new ids

* seed categories respecting existing categories

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-05-08 20:27:41 +00:00
3f4d648562
feat(backend): group invite codes (#8499)
* invite codes refactor

typo

* lint fixes

* remove duplicate initeCodes on User

* fix typo

* clean permissionMiddleware

* dummy permissions

* separate validateInviteCode call

* permissions group & user

* test validateInviteCode + adjustments

* more validateInviteCode fixes

* missing test

* generatePersonalInviteCode

* generateGroupInviteCode

* old tests

* lint fixes

* more lint fixes

* fix validateInviteCode

* fix redeemInviteCode, fix signup

* fix all tests

* fix lint

* uniform types in config

* test & fix invalidateInviteCode

* cleanup test

* fix & test redeemInviteCode

* permissions

* fix Group->inviteCodes

* more cleanup

* improve tests

* fix code generation

* cleanup

* order inviteCodes result on User and Group

* lint

* test max invite codes + fix

* better description of collision

* tests: properly define group ids

* reused old group query

* reuse old Groupmembers query

* remove duplicate skip

* update comment

* fix uniqueInviteCode

* fix test
2025-05-08 19:18:40 +00:00
Wolfgang Huß
e3864b1f9d
feat(webapp): change german to du and dich (#8507)
* Change 'Du' -> 'du'

* Change 'Dich' -> 'dich'

* Change backend e-mails 'Dich' -> 'dich'

* Change backend e-mails 'Du' -> 'du'

* Fix e-mail snapshots

* Revert "Auxiliary commit to revert individual files from eea84f60ba9c17d48a735632709a66452f0494e9"

This reverts commit d80994c3b8bff311422cb44aab1275c31286595a.

* Change backend e-mails 'Du' -> 'du', 'Dich' -> 'dich'

* Change webapp 'Dein<x>' -> 'dein<x>'

* Change backend 'Dein<x>' -> 'dein<x>'
2025-05-08 18:48:26 +02:00
Moriz Wahl
50bc62428e
fix(backend): correct email from (#8501) 2025-05-07 19:42:39 +02:00
Robert Schäfer
290a176407
refactor(backend): types for global config (#8485)
* refactor(backend): types for global config

I saw merge conflicts in these files for #8463 so let's get some parts of this PR into `master` already.

I believe this fixes a small bug. They guard clause didn't ensure that all of REDIS_ configurations were set.

* remove old email mechanism

* refactor(backend: react to @ulfgebhardt's review

See: https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/8485#pullrequestreview-2813528327

* build(backend): optional commit

@ulfgebhardt this is how I tested the configurations. We don't need to include this commit but I wouldn't expect to send out real emails from a `docker-compose` setup.

---------

Co-authored-by: Moriz Wahl <moriz.wahl@gmx.de>
2025-05-07 15:57:35 +02:00
Moriz Wahl
65f764f6d9
feat(backend): signup email localized (#8459)
* localized registration email

* localized email verification email

* localized reset password email
2025-05-05 20:44:14 +02:00
Robert Schäfer
fac818a3e4
refactor(backend): types for context + slug (#8486)
Also these changes saw merge conflicts in #8463 so let's get them merged already.

Co-authored-by: mahula <lenzmath@posteo.de>
2025-05-04 07:44:31 +08:00
Moriz Wahl
e4ae0dfe50
feat(backend): emails for notifications (#8435)
* email templates with pug for all possible notification emails

* more information in emails

* Individual email subjects to all notification emails

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
Co-authored-by: mahula <lenzmath@posteo.de>
2025-05-03 21:11:44 +02:00
c69cef47a1
refactor(backend): refactor context (#8434)
* type for neo4j and neode

* fix build

* remove flakyness

* wait for neode to install schema

* remove flakyness

* explain why we wait for a non-promise

* refactor context

missing change

missing change

* adjust test setup

proper cleanup after test

* lint fixes

* fix failing test to use new context
2025-05-03 09:43:08 +00:00
68edc47f65
remove all helpers on src/helpers (#8469)
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-02 13:57:37 +00:00
edce234745
move models into database folder (#8471)
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-02 11:34:43 +00:00
1536a32b3a
refactor(backend): refactor badges (#8465)
* new badge descriptions

* new user verification color

* new svgs for elevated roles

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-02 09:59:18 +00:00