19 Commits

Author SHA1 Message Date
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
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
aaf3b34125
fix flaky tests (#8638) 2025-06-04 23:40:48 +02: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
507179738a
refactor(backend): types for neo4j & neode (#8409)
* 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
2025-04-25 08:04:58 +00:00
649491f7cb
fix(backend): fix notification emails with different name (#8419)
* fix diffent name notifications

We had emails sent with incorrect names.
This PR combines the query for the email with the user the notification
is sent to since the notification in database was correct.
The underlying problem is the unstable order in which the database can
return values. The results of the two queries were matched by id since
it was assumed that they always return the same order of elements.

lint fixes

fix typo

fix factory

fix tests

* fix tests accoridng to review

also test for the right amount of emails in every test
2025-04-24 00:58:53 +02:00
6f4d347f69
refactor(backend): separate queries (#8358)
* separate all queries into one file each

* fix merge error

* fix lint

---------

Co-authored-by: mahula <lenzmath@posteo.de>
Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-04-21 11:47:12 +00:00
b464a380ca
refactor(backend): lint @typescript-eslint/recommended-requiring-type-checking (#8407)
* lint @typescript-eslint/recommended

* lint @typescript-eslint/recommended-requiring-type-checking

fix type not detected locally due to wierd uuid typings

missing save

error not reported locally

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-04-21 10:32:44 +00:00
Moriz Wahl
89b0fa7a51
feat(backend): do not notify blocked or muted users (#8403)
* no more notifications of blocked or muted users in groups

* do not receive notifications on mentions or observed posts from muted users
2025-04-17 18:22:20 +00:00
2d8fe8a941
fix(backend): block/mute chat (#8364)
* no notification when blocked

* no notifications for muted users

* move tests from emssage to notification middleware

* fix test

* also dont update unreadRoomCount when user is muted

---------

Co-authored-by: mahula <lenzmath@posteo.de>
2025-04-15 10:38:48 +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
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
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
aaa033c6a3
lint fixes 2023-06-21 16:43:18 +02:00
73d0cc4a1c
fix several tests to fit typescript requirements 2023-06-13 14:07:59 +02:00
ebddfa7df4
all files as .ts 2023-06-12 13:25:21 +02:00