1181 Commits

Author SHA1 Message Date
mattwr18
bcae52180e Remove filter on posts for BLOCKED 2020-01-21 19:28:03 +01:00
mattwr18
c7ee90e980 Follow @roschaefer PR suggestions
- As blocking is now reciprocal, we do not need another query, we can
  use neo4j-graphql-js magic to query for a BLOCKED relationship between
the postAuthor and the currentUser
2020-01-21 18:50:46 +01:00
mattwr18
8fe6ad77e0
Merge pull request #2686 from Human-Connection/279-blacklist-users-content
feat: Convert block/unblock to mute/unmute
2020-01-21 17:05:09 +01:00
roschaefer
a86b26a756 Various fixes for data migrations
* Add unique index for `Migration`s
* Fix proper use of `next` callback. First argument is potential error.
* Update migration template
2020-01-20 17:25:36 +01:00
roschaefer
98a4521ecc Add back missing search constraint 2020-01-20 11:28:36 +01:00
roschaefer
b063847849 refactor: Make db:setup init stage of migrate 2020-01-20 11:00:52 +01:00
roschaefer
daf2c40cae Implement Neo4J store for migrate 2020-01-20 10:59:15 +01:00
roschaefer
30268dec09 build(deps): Add migrate for neo4j data migrations
Implement a migration to merge duplicate user accounts with reactive
programming. Those duplicate user accounts existed, because around 40
users have decided to register again while we experienced a bug
related to normalized emails in our database.
2020-01-20 10:59:15 +01:00
roschaefer
c0e2675912 refactor(neo4j) Setup constraints with neode 2020-01-20 10:58:33 +01:00
roschaefer
178143dfb7 refactor(modules): Various import fixes
* DRY schema stitching code
* Use same `.env` configuration file for cypress tests

That last part I couldn't improve a lot. I thought it might be possible
with cypress to import all files from a folder. But since it must be
browser compatible and our backend is not using webpack or anything,
it remains a goal unreached.

close #2773
close #2774
2020-01-17 15:59:19 +01:00
mattwr18
d682ee1ec6 Fix lint 2020-01-14 10:47:32 +01:00
mattwr18
84e475fd8a Merge branch 'master' of github.com:Human-Connection/Human-Connection into 279-blacklist-users-content 2020-01-13 21:22:58 +01:00
mattwr18
1f06a862e7
Merge pull request #2262 from Human-Connection/1463-search-for-users
🍰 Search For Users
2020-01-10 13:59:44 +01:00
Moriz Wahl
8c7079cf81 changes requested by reviews 2020-01-10 09:23:56 +01:00
mattwr18
5d5574b1b5 Blocked users cannot comment on my posts 2020-01-09 16:07:25 +01:00
mattwr18
fc567b9d84 Remove Content.feature
- Muting a user means I cannot see their content, they can still see
mine
- Even for blocking, we want a blocked user to be able to see the
content just not interact with it.
2020-01-09 13:47:30 +01:00
mattwr18
ba3e9e1025 Rename blacklist/whitelist to mute/unmute
- Follow @roschaefer suggestion in issue
- This can be reverted if we decide otherwise
2020-01-08 18:04:26 +01:00
mattwr18
cd7f0e2783 Fix/extend cypress tests 2020-01-08 17:08:06 +01:00
mattwr18
c297b83f87 Convert block/unblock to blacklist/whitelist
- at the moment, we have implemented blocked like we want the
blacklist/whitelistUserContent to be, with the exception that is should
not be both ways. If I blacklist a user's content, they still see my
content in their news feed.
2020-01-07 18:57:35 +01:00
Moriz Wahl
3f37b007d7 improved specs 2020-01-07 15:35:04 +01:00
mattwr18
303558d173 Merge branch 'master' of github.com:Human-Connection/Human-Connection into update_neo4j_driver 2020-01-07 11:38:01 +01:00
Moriz Wahl
57ab9128ea removed Hashtag search 2020-01-07 09:16:34 +01:00
Moriz Wahl
07b2b7ca3b Please pass the tests now 2020-01-06 18:36:59 +01:00
Moriz Wahl
de6053dfa3 try again, cypress blackbox 2020-01-06 18:02:11 +01:00
Moriz Wahl
71c9d92aea query string for searches changed and basics for Hashtag search added 2020-01-06 16:46:43 +01:00
mattwr18
885fa8f1fc Parse xss before extracting mentions/hashtags 2020-01-06 15:39:26 +01:00
Moriz Wahl
b4d120dff3 Merge branch '1463-search-for-users' of https://github.com/Human-Connection/Human-Connection into 1463-search-for-users 2019-12-23 01:53:08 +01:00
roschaefer
f1b581aa86 Improve performance with pattern comprehensions
@Mogge @mattwr18 this is how you can eagerly fetch resources
2019-12-20 20:13:02 +01:00
roschaefer
b3521d8ce5 Improve performance, log database statements
@Mogge first of all, you can wait for multiple promises in parallel
by using Promise.all([...]). Second if you run:
```sh
DEBUG='human-connection:neo4j:cypher' yarn run dev
```
in order to log out all database statements. I added log statements to
the new search resolver.
2019-12-20 19:30:22 +01:00
roschaefer
34a3f81dd3 Refactor transformReturnType
@Mogge I personally find `RETURN resource {.*, foo: "bar"}` extremely
useful.
2019-12-20 17:47:12 +01:00
Moriz Wahl
19b6fe9b94 Trying to find users located close to user 2019-12-20 01:14:24 +01:00
mattwr18
3ef04f8391 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1463-search-for-users 2019-12-19 17:16:48 +01:00
mattwr18
f7de76eea5 Tidy up a bit
- Remove unused function
- Add wildcard to end of query to remove quirky behavior
- Favor more verbose variable naming
2019-12-19 17:15:25 +01:00
mattwr18
3712f86b7b Merge branch 'master' of github.com:Human-Connection/Human-Connection into update_neo4j_driver 2019-12-19 12:16:14 +01:00
Wolfgang Huß
377f2eecd2
Merge pull request #2351 from Human-Connection/1746-Blur_explicit_Image_Content
Blur Images
2019-12-19 11:46:38 +01:00
mattwr18
cce28e6c7a Fix cypress tests 2019-12-19 00:01:42 +01:00
mattwr18
46c4602db1 Filter for blockedUsers/content, fix cypress 2019-12-18 20:42:06 +01:00
ogerly
d2a17373b0 last step ? 2019-12-18 16:43:24 +01:00
roschaefer
d7193ab3b6 Update neo4j-driver
Fix API changes. Also close the session in resolver only and refactor
userMiddleware to become a part of the resolver.
2019-12-17 20:20:16 +01:00
roschaefer
deaf071550 Update neode
This fixes some API changes with the update of neode.
2019-12-17 11:38:02 +01:00
Moriz Wahl
9e1182d3b6 refactored with transactions 2019-12-17 11:28:57 +01:00
roschaefer
3ee30a7738 Update neo4j driver 2019-12-17 10:28:00 +01:00
Alexander Friedland
ed617f8c83
Merge branch 'master' into 1746-Blur_explicit_Image_Content 2019-12-17 07:39:26 +01:00
mattwr18
f876021ec6 Fix: User.name is not non-nullable 2019-12-13 17:48:19 +01:00
mattwr18
4cd43b68a4 Refactor further search
- in the end, the error was due to not asking for the id of the author
back of the Post.. grrr.... why couldn't we get better error messages!!

- Co-authored-by: Moriz Wahl <moriz.wahl@gmx.de>
2019-12-13 15:56:18 +01:00
mattwr18
1f2216cd4f Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1463-search-for-users 2019-12-13 12:31:14 +01:00
mattwr18
ebc5cf392d Fix search by adding result id
- Apollo cache requires an id to commit to their store
- add id to each query result
- refactor out the store
- still can use a lot of refactoring
2019-12-13 12:30:00 +01:00
mattwr18
307076771c Fix lint 2019-12-13 10:45:58 +01:00
mattwr18
dfd30cbaac Remove check for setting name to null or undefined
- this was making things more likely to fail from the frontend, we would
need to consider doing a db manipulation for users from the old alpha
who have user.name as null.
- it only protects against someone who bypasses our UI and sends a
message directly to the backend, but if they can do that we have bigger
problems.
2019-12-13 10:17:19 +01:00
mattwr18
d375ebe7d9 Write test/refactor tests/resolvers/middleware
- write tests for userMiddleware
- checks the functionality of nodes/locations middleware
- refactor to not allow users to update to remove their name
  debatable whether we want that or not, but we do not allow users to
create accounts with no name, so we should be consistent, before we were
using neode to validate this, but we have are removing neode from
production code, so we must validate ourselves
- collate UpdateUser mutations to one
2019-12-12 18:14:47 +01:00