2184 Commits

Author SHA1 Message Date
mattwr18
70bb034343 Remove unused email property from user factory 2020-02-10 13:13:51 +01:00
mattwr18
3b29d480e3 Display unblock feature only for blocking user
- add hasBlocked query to check if userA initiated the blocking and, if
  true, only them to unblock userB.
- add cypress tests to make sure we don't break this in the future.
2020-02-10 12:34:40 +01:00
roschaefer
a77f8d92bc Speed up factories a little 2020-02-08 17:55:07 +01:00
mattwr18
6271b53b30 Set up Subscriptions with RedisPubSub 2020-02-07 14:48:55 +01:00
roschaefer
46edc3fdd5 Replace buildList with array of Promises
reason: Rosie.js does not support promises. So for the time being, we
shall not use more than one `after` callback and we shall not use
buildList as it does not return a `Promise.all([])`. We have to ask the
maintainers of Rosie.js if they accept the breaking change of returning
a Promise always.
2020-02-07 14:28:57 +01:00
roschaefer
3c50255da2 Merge remote-tracking branch 'origin/master' into refactor_factories_with_rosie 2020-02-07 14:07:19 +01:00
Moriz Wahl
86f298f8e5 prettier, prettier 2020-02-06 23:00:06 +01:00
Moriz Wahl
4905b09b3e migration added to swap lat and lng in db 2020-02-06 20:47:45 +01:00
Moriz Wahl
cb8b2acffd swap lng and lat in db seed 2020-02-06 19:56:44 +01:00
Moriz Wahl
976583b235 fixing test for geolocation 2020-02-06 19:56:44 +01:00
Moriz Wahl
ef9d351fcf swap lat and lng 2020-02-06 19:56:44 +01:00
mattwr18
0851ad4c50 Add end line 2020-02-06 10:33:56 +01:00
mattwr18
7ac973f9a1 Refactor cypher statement to simplify
- it's questionable whether this simplifies it or not, and actually adds
  one line of code, but now it looks more similiar to the code in the
notifications query
2020-02-05 20:45:56 +01:00
mattwr18
6cf067937d Clean up
- remove the code for subscriptions to Post as we won't implement this
  at this time... I've created a new branch with the code that can be
built on later
- remove unused subscription path
- add possibility to use websockets uri for production env.
2020-02-05 20:24:23 +01:00
mattwr18
1c6a5503db Get subscriptions working with notifyUserOfComment
- Co-Authored-By: Tirokk <wolle.huss@pjannto.com>
2020-02-05 19:06:55 +01:00
mattwr18
110165691a Refactor out transformReturnType function
- we have introduced a better way to return all the info we want without
  needing to make multiple database queries. It was introduced by
@roschaefer in the PR for the notifications query, but we hadn't
refactored markAsRead yet.
- Now that we are subscribing to notifications, we need to have the same
  return info as the notification query.

- Co-authored-by: Tirokk <wolle.huss@pjannto.com>
2020-02-05 18:42:31 +01:00
mattwr18
2f43069ea0 Subscribe to notifications/remove polling
- We want to publish when a notification occurs for a specific user, not
  have the client poll the backend for ever user every minute.

- Co-authored-by: @Tirokk <wolle.huss@pjannto.com>
2020-02-05 17:37:38 +01:00
mattwr18
04f0467d2d Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1703-add-vue-apollo-subsriptions 2020-02-05 14:33:57 +01:00
mattwr18
5931e363ef
Use original createdAt for merged users/emails (#2969)
- Also, use original verifiedAt date for emails. These users only have
  newly created accounts/emails because of our blunder. Their nodes
should reflect when they became members/verified their emails.
2020-02-03 19:17:48 +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
mattwr18
701411e270 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1680-Direct_answer_on_Comment 2020-01-31 13:08:31 +01:00
mattwr18
60cd593826 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1724-block-users 2020-01-30 10:47:50 +01:00
mattwr18
bcc1ab167e Improve styling per @alina-beck review 2020-01-30 10:46:43 +01:00
roschaefer
910f122087 Fix lint and cypress 2020-01-29 02:02:58 +01:00
roschaefer
f9c42ab2a5 refactor(seeds): Use buildList to setup lists 2020-01-28 23:40:41 +01:00
roschaefer
fc367297e3 Get rid of different factory files
..and fix some cypress tests
2020-01-28 23:12:50 +01:00
roschaefer
2fc71d75a5 Refactor factory for comments 2020-01-28 22:43:27 +01:00
roschaefer
95bfb090fd Refactor factory for posts 2020-01-28 22:43:26 +01:00
roschaefer
094fa196e6 Fix factories for cypress tests 2020-01-28 22:43:26 +01:00
roschaefer
2a79c53765 Refactor user factory 2020-01-28 22:43:26 +01:00
roschaefer
63939fa9e0 Refactor all dependencies without dependencies 2020-01-28 22:43:26 +01:00
Robert Schäfer
65811e2d8b
Merge pull request #2898 from Human-Connection/add_underline_menu_button
feat(editor): Underline markup for posts+comments
2020-01-28 22:34:30 +01:00
mattwr18
d6a2f2d9e3 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1680-Direct_answer_on_Comment 2020-01-27 20:08:37 +01:00
mattwr18
d6a5b7ce65 Update post factories with guard clause 2020-01-27 17:32:09 +01:00
mattwr18
b48b93dd0d Set up cypress test for direct reply to comment 2020-01-27 15:07:32 +01:00
mattwr18
37178fd6ba Add migration for muted relationship 2020-01-27 13:28:12 +01:00
roschaefer
789c40c34e feat(editor): Underline markup for posts+comments
We had tiptap's underline and never used it. A user has asked for it, so
why not implement it right away?

Suggested by `@raimundo@human-connection.social`:
https://human-connection.social/post/612bf465-91ce-4be8-906e-3bde63617346/hcsocial-dein-netzwerk-news-mit-dennis-and-robert-1#commentId-b864d04f-1e8c-48c4-9ed0-98aefaed1c02
2020-01-26 20:39:52 +01:00
mattwr18
a28eb8c91f Start subscriptions for notifications 2020-01-24 18:23:59 +01:00
roschaefer
3be5dee08b Draft: Setup subsriptions for backend+frontend
Please clean up this commit and squash it later on.
2020-01-24 17:25:45 +01:00
mattwr18
1057ac4cbe Merge branch 'neo4j_data_migrations' of github.com:Human-Connection/Human-Connection into neo4j_data_migrations 2020-01-23 20:43:10 +01:00
mattwr18
f8f62cc71f Merge branch 'master' of github.com:Human-Connection/Human-Connection into neo4j_data_migrations 2020-01-23 20:42:44 +01:00
Mike Aono
d49afc25cf test(cypress): Cover "Pinned post" feature
* Implement cypress tests

- Start implementation of cypress tests for pinned posts

* Test that Admin can pin a post

- Tests the process of an admin pinning a post

* Resolve failing tests

- Fix ordering of posts immediately after pinning posts by reloading page
- Check that tests are pinned posts are displayed first for role user

* Refactor to seperate the initialization

- Of the post data created in the database during setup

* Fix toaster test

* test(cypress): Add missing parts for pin feature

* docs(cucumber): Link to admin 🥒 folder

* Follow @mattwr18's suggestions

* test(backend): Order pinned posts like frontend

@mattwr18 I think this was a false negative.

Co-authored-by: Robert Schäfer <git@roschaefer.de>
2020-01-23 20:30:12 +01:00
mattwr18
bbb4dd56cd Follow review suggestions/add button to unblock
- @roschaefer gave several suggestions
- we have a button to unblock/unmute users on profile page
2020-01-23 19:18:12 +01:00
roschaefer
e343701057 Reverted a couple changes by @mattwr18
We have to figure out if `mergeRels: true` is actually avoiding
duplicate relationships 🤔.

Before:
(l1)-[:IS_IN]->(l2)
(l1)-[:IS_IN]->(l3)

After:
(l1)-[:IS_IN]->(new)
(l1)-[:IS_IN]->(new)
2020-01-23 17:38:31 +01:00
mattwr18
28dae1f854 Update docs, follow @roschaefer suggestions
- create command should be run with --date-format to be more human
  readable, and --template-file to use our template instead of migrate's
default
- rename migrations
- rename createdAt to migratedAt to remove ambiguity
- do not merge relationships for Location nodes as we don't want to
  create duplicate relationships
- use singular locationId as it's iterating one at a time
2020-01-23 15:44:34 +01:00
mattwr18
8accc62f18 Merge branch 'master' of github.com:Human-Connection/Human-Connection into neo4j_data_migrations 2020-01-22 15:23:11 +01:00
mattwr18
0ab19dde2a Insert missing closing parantheses breaking search 2020-01-22 13:55:57 +01:00
mattwr18
c6bfca312c Favor createdAt over timestamp
- it's more human readable and consistent with all other nodes in
  production
2020-01-22 13:31:48 +01:00
mattwr18
561889c530 Add migration to merge duplicate Locations
- having duplicate Location nodes in the production database blocks us
  from adding a unique constraint, so that Locations are not created
which have the same id.
2020-01-22 13:19:38 +01:00
mattwr18
1de99511db Include BLOCKED users in search results 2020-01-22 10:43:30 +01:00