2113 Commits

Author SHA1 Message Date
117c0d75e7
refactor(backend): user graphql (#8354)
* refactor user graphql

- remove isLoggedIn query
- currentUser query only for authenticated, currenUser always returns a
User
- currentUser query implementation uses neo4jgraphql with id parameter
- remove custom email field from user
- fix bug in frontend when there is no categories

* remove comment

* remove unused filter

* fix currentuser test

* fixedswitchUserRole mutation

* fix categories
2025-04-12 00:50:16 +00:00
fa0280f9e9
fix block user (#8363) 2025-04-11 23:44:21 +00:00
Max
caeff070b7
feat(webapp): add mute/unumute group to menu (#8335)
* basics to notify a user when a followed user posted

* do not notify following user on posts in groups

* followig user wrote post notification

* notify regular group members when a new post is posted in the group

* mute and unmute groups

* clean database at end

* locale for post in group notification

* post in group notification triggers correctly

* email settings for post in group

* Add mute/unumute group to menu (WIP)

* Add mute group functionality (WIP)

* Add locales; use mute/unmute mutations, cleanup tests

* Overhaul group content menu test

* Rename isMuted to isMutedByMe and add it to group query

* Add German and English locales

* Add spanish translations

* Add missing translation keys (with null values)

* Remove console statement

* Add snapshot

* Replace mount by render

* Mock Math.random(), add tests for mute/unmute

* Use container instead of baseElement for snapshots

* fix group slug tests

* undo wrong variable naming

* rename parameter to groupId of mute/unmute group mutation

* rename parameter to groupId of mute/unmute group mutation

* only non pending members have access to the comtext menu

---------

Co-authored-by: Moriz Wahl <moriz.wahl@gmx.de>
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-04-11 23:10:42 +00:00
Moriz Wahl
7a44e1aa4e
test that there is no email sent when no notification (#8362) 2025-04-11 23:49:31 +02:00
Moriz Wahl
aedf8d93c7
feat(backend): notify posts in groups (#8346)
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-04-11 20:50:59 +00:00
Moriz Wahl
3734e2ef56
feat(backend): notify users when a followed user posted (#8313) 2025-04-11 17:56:11 +02:00
Wolfgang Huß
bda0de0249
fix(backend): fixing admin email notification settings (#8356)
* Fix admin e-mail notification settings

* Optimize migration '20250405030454-email-notification-settings.ts' down

* Update backend/src/db/admin.ts

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-04-11 10:00:15 +00:00
711061b0c0
fix(backend): error when there is an abandoned email (#8315)
* fix error when there is an abandoned email

We check beforehand if an email has an user attached, but we never
delete an email without user. This will violate a unique constraint
blocking that particular email from ever being used again.

* fix tests
2025-04-10 18:17:51 +00:00
Moriz Wahl
abd13a6cff
migrate commenting users to observe commented posts (#8308) 2025-04-10 19:36:26 +02:00
ab6fe37c3e
refactor(backend): new chat message notification email (#8357)
* new chat message notification email

- new mail features name in subject and text

* fix english version

* typo

* fix typos

* adjust tests
2025-04-10 16:38:51 +00:00
fcc99ab58e
refactor(backend): clean migrate scripts (#8317)
* clean migrate scripts

- refactor migrate:init
  - separate admin seed
  - separate categories seed
- rework backend README regarding the database
- remove `db:clean` command as its a duplicate of `db:reset`
- remove `__migrate` helper alias

* renamed clean.ts to reset.ts

* set indices & constrains in init function

* fix comment

* disable migrations touching indices

* remove obsolete comment

* always run init on kubernetes

* reset db with or without migrations

* lint fixes

* Refine 'README.md'

* Refine more 'README.md'

* fix lint

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-04-10 09:52:49 +02:00
Max
1b07b06ca7
feat(webapp): notification settings frontend (#8320)
Implements detailed settings for email notifications.

Issues
relates 🚀 [Feature] Drei neue Interaktions-Benachrichtigungen #8280
2025-04-09 13:21:38 +00:00
Moriz Wahl
fe7bab4675
posts and comments created by the factory set the observe relation (#8344) 2025-04-09 08:36:56 +00:00
f782032563
refactor(backend): lint - import/order (#8350)
* lint - import/no-relative-parent-imports

fix build error

* fix md

* lint import/order

enabled rule import/order and fixed impot order in each file
2025-04-09 09:44:48 +02:00
a4f391930c
lint - import/no-relative-parent-imports (#8349)
enable import/no-relative-parent-imports
2025-04-08 23:18:07 +02:00
59c145c1f9
lint plugin n - update and cleanup (#8342)
- Update plugin n to fix a deprecation warning
- Order n rules according to docu
- use n:recommended
- comment out all rules from recommened
- enable some rules
2025-04-08 08:35:49 +00:00
f7c371c9ce
lint import/no-extraneous-dependencies (#8341) 2025-04-08 07:35:11 +00:00
d6cb9b51c3
feat(backend): lint rules (#8339)
* eslint import

* eslint comments

* eslint security

* eslint import - rules

* eslint n

* eslint promise

* eslint no-catch-all

* eslint jest

* missing ignore

* disable import/unambiguous as conflicting
2025-04-07 10:53:44 +00:00
2eaaa7af39
feat(backend): chat notify via email (#8314)
* client

* backend

* tests

* also save awaySince timestamp

* remove console.log

* chat notification logic

* send notification mails for chat messages

* externalize online check, resolver resover first

* prevent email notifications for blocked users

comment

* respect user email notification settings

* properly handle null case for email destructuring

* tests

* corrected mail style

---------

Co-authored-by: mahula <lenzmath@posteo.de>
2025-04-07 12:23:36 +02:00
Moriz Wahl
0835057cc7
refactor(backend): comment on observed post notification (#8311)
* all users that observe a post are notified when the post is commented, except of the author of the comment, or users that blocked the commenter

* test to illustrate the behavior of notifications for observed posts
2025-04-04 19:16:50 +02:00
5462a5b4c1
fix(backend): typo in groups resolver (#8318)
* fix typo

* fixed all related typos in unittests and found another in groups

---------

Co-authored-by: mahula <lenzmath@posteo.de>
2025-04-03 22:01:10 +00:00
Moriz Wahl
72f469d823
migration adds OBSERVES relation between author and post (#8307) 2025-04-03 16:46:02 +00:00
Moriz Wahl
130da7509b
fix(backend): users observing post count (#8295)
* do not count users that are deleted or disbled
2025-04-03 16:03:53 +00:00
01027e42cc
feat(webapp): track online status (#8312)
* client

* backend

* tests

* also save awaySince timestamp

* remove console.log
2025-04-03 17:19:53 +02:00
Moriz Wahl
316c12bd35
provide information of the observing status of the post after creating a comment (#8310) 2025-03-31 20:41:39 +02:00
Moriz Wahl
538f409086
feat(backend): observe posts (#8292)
* After creating the post, the author of it automatically observes it to get notifications when there are interactions

* a user that comments a post, automatically observes that post to get notifications when there are more interactions on that post

* mutation that switches the state of the observation of a post on and off
2025-03-26 22:16:06 +01:00
Robert Schäfer
628b57aa29
feat(other): major improvement of deployment (#7925)
* feat(other): major improvement of deployment

Motivation
----------

Kubernetes:
* backend becomes a statefulset (exclusive volume mount)
  See: https://spacelift.io/blog/statefulset-vs-deployment
* implement neo4j backup with job

Docker:
* consistent targets across all dockerfiles
* remove redundant labels
* remove unnecessary build args
* remove obsolete networks
* remove development dependencies for production

Rebranding:
* add image tags for local tagging and pulling
* use Github's docker build workflows
* use Github container registry
* ONBUILD to simplify caller Dockerfiles
* docker compose for branding

Tooling:
* same node --version as in dockerfile

Docs:
* missing step in README.md

* refactor: remove submodules

It's better to keep them all in a separate repository

* improve kubernetes chart

* better image tag defaults
* split neo4j into its own chart (for re-use)
* use application defaults where possible

* optional resources for all pods

* remove obsolete key/value pair from secrets

* remove obsolete build argsand

and add labels for neo4j enterprise

* env vars for webapp

* allow to define redirect domains

Define a list of Domains that redirect to the domain of the project. The
idea is to provide the ability to redirect eg. www.domain.tld to
domain.tld

* remove maintenance part regarding database

* move backup job outside template folder

* name the ingress

* updated ingress

* handle empty case of middlewares

* try to default the ingress

* use quote

* restore todo-next-update

* fix docu check

* fix naming

* try using prod:migrate

* try using override config

* copy src folder

* try using base as image instead of build

* fix test build

* force build

* comment for the problem

* fix webapp tests (potentially)

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-02-28 18:22:23 +01:00
mahula
42e039f338 fix geodata in mapbox-related resolver test 2024-10-20 13:52:31 +02:00
mahula
368a05d867 adapt cheerio import to package update 2024-09-08 08:43:06 +02:00
Wolfgang Huß
0691b8eb79 Fix backend test which uses 'newlyCreatedNodesWithLocales' in file 'backend/src/schema/resolvers/users/location.spec.ts' 2024-08-29 13:48:21 +02:00
Wolfgang Huß
27777eedaa Fix backend tests 'valid event input with location name' 2024-08-29 13:42:40 +02:00
mahula
6cecd3662f adapt backend image faking due to deprecation warning 2024-04-29 17:48:41 +02:00
mahula
7b3ed63bc9 adapt backend image faking due to deprecation warning 2024-04-29 15:29:46 +02:00
mahula
01c8c2a57b adapt backend avatar faking due to deprecation warning 2024-04-29 14:50:20 +02:00
mahula
e2654de55d adapt name and random faking to updates faker api 2024-04-29 08:36:34 +02:00
mahula
7ef2c474b2 add package linkify-html to backend 2024-04-18 20:04:21 +02:00
mahula
b735824967
use dedicated linkifyjs packages according to package update 2024-04-18 19:01:05 +02:00
mahula
936ccf9877 due to changes in 9.0.0 use named import 2024-03-02 13:24:00 +01:00
Wolfgang Huß
6a87ed5cb4 Fix backend tests to new default group description length without HTML 2024-01-04 14:49:55 +01:00
Wolfgang Huß
9c1d6d7f1f Change group 'DESCRIPTION_WITHOUT_HTML_LENGTH_MIN = 3', was '50' 2024-01-04 11:48:21 +01:00
Moriz Wahl
ecf351988f fix(backend): expired jwt in unit test 2023-11-27 22:22:41 +01:00
Moriz Wahl
ed5149c41e raise backend unit test coverage, no promise all in notification spec 2023-11-02 19:16:41 +01:00
Moriz Wahl
437642a6e1 Merge branch 'master' into fix-event-date-format 2023-11-02 10:01:39 +01:00
Wolfgang Huß
64f276e56c Fix divers links etc. in diverse readmes 2023-10-26 19:04:51 +02:00
Moriz Wahl
fdf38af4e9 unit tests for ISO format of event dates 2023-10-26 16:49:15 +02:00
Moriz Wahl
44d6f31574 timezone offset in migration 1 hour, check event date string for ISO format 2023-10-26 16:40:41 +02:00
Moriz Wahl
fe3e5dc483 fix cypher statement 2023-10-17 15:35:38 +02:00
Moriz Wahl
fe416200fb migration to fix wrong event date times 2023-10-17 15:15:28 +02:00
Moriz Wahl
eedc93f7c5 fix cypher statement in unit test 2023-10-02 17:01:42 +02:00
Moriz Wahl
b1b26862a6 fix(backend): postType as array in searchPosts 2023-09-26 15:02:47 +02:00