Commit graph

57 commits

Author SHA1 Message Date
Jonne Haß
2d28ddc1ef Add API route to (un)block a user 2020-03-20 12:38:27 +01:00
Jonne Haß
cd6e02ccec API: allow post creation without a body when there are photos 2020-02-20 18:50:32 +01:00
Jonne Haß
e9242d7754 API: Fix fetching explicitly not only unread conversations 2020-02-17 10:59:10 +01:00
Benjamin Neff
4139ae2549
Merge branch 'next-minor' into develop 2020-02-12 00:13:19 +01:00
Dennis Schubert
2e2b42ef1a
Mark non-attribute usage in SQL queries as safe.
Non-attribute arguments will be disallowed in Rails 6.0.
2020-02-11 23:54:55 +01:00
Jonne Haß
04744b4dac API: Return 409 when trying to create something existing and 410 when trying to delete something already gone
Probably missed a few more cases where we always return sucess when the user requests
status quo, but this should cover most ground
2020-02-02 18:04:11 +01:00
Jonne Haß
8d690a9e33 undo changes in introduced by merge conflicts in the api branch 2020-01-21 23:56:01 +01:00
Jonne Haß
39c863ead9 Merge branch 'develop' into api 2020-01-21 23:35:01 +01:00
Jonne Haß
cb679371ac Merge branch 'develop' into api 2020-01-21 23:34:43 +01:00
Benjamin Neff
8372fb2240
Merge branch 'next-minor' into develop 2019-04-28 16:48:49 +02:00
Benjamin Neff
17af65e22c
Allow links with only the diaspora ID to link to a profile
closes #8000
2019-04-28 16:48:31 +02:00
Benjamin Neff
91aae4d755
Fix 500er when calling protocol handler with invalid URL 2019-04-28 16:44:29 +02:00
cmrd Senya
f85f167f50 Implement archive import backend
This implements archive import feature.

The feature is divided in two main subfeatures: archive validation and archive import.

Archive validation performs different validation on input user archive. This can be
used without actually running import, e.g. when user wants to check the archive
before import from the frontend. Validators may add messages and modify the archive.

Validators are separated in two types: critical validators and non-critical validators.

If validations by critical validators fail it means we can't import archive.

If non-critical validations fail, we can import archive, but some warning messages
are rendered.

Also validators may change archive contents, e.g. when some entity can't be
imported it may be removed from the archive.

Validators' job is to take away complexity from the importer and perform the validations
which are not implemented in other parts of the system, e.g. DB validations or
diaspora_federation entity validations.

Archive importer then takes the modified archive from the validator and imports it.

In order to incapsulate high-level migration logic a MigrationService is
introduced. MigrationService links ArchiveValidator, ArchiveImporter and
AccountMigration.

Also here is introduced a rake task which may be used by podmins to run archive
import.
2019-04-26 18:41:27 +03:00
Hank Grabowski
ce01946eb0 Fixed new pronto warnings after develop branch sync 2018-12-30 17:04:35 -05:00
Hank Grabowski
f07912ebdd API Branch Final Cleanup Before PR 2018-12-30 11:50:58 -05:00
Hank Grabowski
a8d69c48dc OpenID Scopes and Security updates 2018-12-26 14:13:13 -05:00
Hank Grabowski
ff6d0064d0 Add Poll Voting Method to Interactions Endpoint 2018-12-16 11:06:27 -05:00
Hank Grabowski
8851f664e5 Photos API Endpoint and unit tests complete 2018-12-10 12:43:50 -05:00
Hank Grabowski
c3852a8e9c Users Controller and unit tests complete 2018-12-04 08:48:16 -05:00
Hank Grabowski
ef762c4920 Notifications API Endpoint and unit test complete 2018-12-04 07:51:57 -05:00
HankG
8a60870f04 Contacts API Feature complete with full tests 2018-12-01 15:21:16 -05:00
Hank Grabowski
d5e1cbeefa Tags API Endpoint complete with full tests 2018-11-11 11:45:21 -05:00
Hank Grabowski
038b6f49a9 Comments API Endpoint complete with full unit tests 2018-11-01 14:14:34 -04:00
Frank Rousseau
79fe1c2a7e Fix like deletion 2018-11-01 13:56:18 +01:00
Frank Rousseau
c1ece44c53 Make Post API match specs
https://diaspora.github.io/api-documentation/routes/posts.html
2018-11-01 13:56:18 +01:00
Frank Rousseau
bcbcf6bce3 Make the comment API match the API specs 2018-11-01 13:56:18 +01:00
Frank Rousseau
348790292b Make API likes controller match specs 2018-11-01 13:56:18 +01:00
Frank Rousseau
50e034769f Make syntax compliant with the pronto configuration 2018-11-01 13:56:18 +01:00
Frank Rousseau
71d324a8e4 Follow official specs 2018-11-01 13:56:18 +01:00
Frank Rousseau
454be1b468 Make conversation API data format ok with docs
* Base the API requesting on GUID instead of ID
* Include read field
* Do not include messages in conversation results
2018-11-01 13:56:18 +01:00
Frank Rousseau
d03b830b07 Fix styles for some API controllers
* Comments
* Likes
* Streams
2018-11-01 13:56:18 +01:00
Frank Rousseau
1879adcde4 Add service for conversations 2018-11-01 13:56:18 +01:00
theworldbright
ea3395378f Combine Comment index with Post show API route 2018-11-01 13:56:18 +01:00
cmrd Senya
6f812a5b8f
Add LinksController
LinksController redirects requests for provided diaspora:// links to
respective entities urls.
2018-07-11 01:24:28 +02:00
cmrd Senya
0080a2567f
StatusMessageController#create: respond 422 when aspect_ids are wrong
fixes #3862

closes #7742
2018-03-25 08:31:32 +02:00
cmrd Senya
e0e40f73c3
Spec for post creation bad aspects_ids issue 2018-03-25 08:28:59 +02:00
Benjamin Neff
e82690963d
Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
Benjamin Neff
8a5752dd6c
Fix creating a post with poll
There were validation errors because `answer.poll` wasn't set.
2017-08-12 15:39:21 +02:00
Benjamin Neff
ec2c4a8564
Merge branch 'next-minor' into develop 2017-02-18 23:00:59 +01:00
Steffen van Bergerem
44b616eda8
Add reshare service 2017-02-18 22:59:38 +01:00
Steffen van Bergerem
f93124863f
Add like service 2017-02-18 22:59:33 +01:00
cmrd Senya
1fb6040344
new PostController#mentionable_in_comment action 2017-01-13 04:47:50 +02:00
cmrd Senya
33ad411bbd
Mentions in comments backend changes 2016-11-28 15:56:56 +02:00
Steffen van Bergerem
46cbc6e52a
Filter mentions on status message creation 2016-07-04 10:26:45 +02:00
Benjamin Neff
70f378a1c1 don't participate own posts on creation 2016-06-26 06:21:02 +02:00
Benjamin Neff
7184d4334e remove after_dispatch hook
handle photos in StatusMessageCreationService
2016-06-26 06:21:00 +02:00
Benjamin Neff
ebfb0aa884 create NotificationService: send notifications after receive 2016-06-26 06:20:59 +02:00
Benjamin Neff
0c8588eec8 PostService: create find!
* find returns nil if nothing found
* find! raises errors if not found or not visible
2016-03-07 05:52:54 +01:00
Benjamin Neff
017842cc01 don't update updated_at date when read the notifications.
updated_at is displayed in the frontend and should only be updated when
another notification_actor gets added

Also improved the sql-queries: update directly and not select first and
update then.
2016-03-07 05:52:54 +01:00
Benjamin Neff
d94eae0d45 refactoring PostService
* move presenters back to controllers, this is view-logic
* use PostService in CommentService
* remove iframe route, this is not used anymore
* id/guid limit at 16 chars, hex(8) is 16 chars long
2016-03-07 05:52:54 +01:00