Commit graph

5157 commits

Author SHA1 Message Date
Benjamin Neff
fddfd8b8c0
Merge pull request #8363 from cmrd-senya/fix-api-tags-stream-to-hide-ignores
API: update Search endpoint to be aware of ignored users
2024-06-05 01:06:26 +02:00
Benjamin Neff
c3eaa212af
Merge pull request #8406 from Flaburgan/6184-service-disabled
Do not show the service to the user if it is disabled, fixes #6184

Fixes #6184
2024-06-05 01:04:00 +02:00
Benjamin Neff
7ec2a68256
Merge pull request #8439 from jhass/feature/comment_likes_api
add API routes for comment likes
2024-06-05 01:01:52 +02:00
Benjamin Neff
80beedfe63
Merge pull request #8442 from Flaburgan/mark-like-on-comment-notifications-as-read
Mark Likes on comment notifications as read when visiting a post
2024-06-05 01:01:04 +02:00
Benjamin Neff
02f8629254
Fix Person spec to prepare ruby upgrade 2024-06-05 00:35:48 +02:00
Benjamin Neff
649d8c5b56
Mark notifications as read in a single SQL query
There is no need to load all comments only to count them. Lets just let
the database do all the work. If there are no comments found, nothing
will happen anyway.

Also already filter the comments to only search for notifications for
own comments.

And add some tests :)
2024-06-03 00:11:45 +02:00
Benjamin Neff
52424fba6d
Add available_services helper to be used for desktop and mobile 2024-06-02 05:08:29 +02:00
Benjamin Neff
9e61693e20
Allow fetching comments
Now with likes on comments, diaspora also tries to fetch comments if it
receives a like for a comment it doesn't know yet. So this now also
allows to fetch comments with `/fetch/comment/<guid>`.
2024-01-21 23:30:51 +01:00
Jonne Haß
1e1130e211 add API routes for comment likes 2023-11-24 18:12:59 +01:00
Benjamin Neff
389b1870d3
Merge pull request #8437 from SuperTux88/fix-photo-export-spec
Ensure image processing gets disabled again, even after exceptions
2023-11-13 02:32:57 +01:00
Benjamin Neff
42ffd6322f
Merge pull request #8203 from tclaus/2999-likes-comment
Re-introduce likes on comments
2023-11-13 02:32:43 +01:00
Benjamin Neff
b0c196aea0
Add notifications for likes on comments 2023-11-13 02:27:55 +01:00
Benjamin Neff
df8275f000
Fix participations for likes on comments in the backend
When liking a comment, the post also gets a participation, and if all
likes/comments get removed again, the participation also gets removed
again.

The only thing still not working properly is the frontend, but that is
already broken when unliking a post. So it shows an invalids state in
the frontend when unliking the post/comment.
2023-11-13 02:27:55 +01:00
Benjamin Neff
edfb603965
Fix API v1 schema for likes on comments and add test 2023-11-13 02:27:55 +01:00
flaburgan
8d6548b610
Introduce like-interactions.js
Adapt to latest development

User likes
 Set css class for inline likes on comment

Re-set participation on comment likes

Co-authored-by: Thorsten Claus <ThorstenClaus@web.de>
2023-11-13 02:26:59 +01:00
Benjamin Neff
4f798fc5d8
Ensure image processing gets disabled again, even after exceptions
Otherwise this leaves it enabled if the processing failed, which then
makes other specs fail where they expect the image not being processed
(for example still have the initial set dimensions, instead of the one
read from image after processing).
2023-11-13 01:36:54 +01:00
flaburgan
587e106095
Add a more detailed modal when reporting a post or a comment 2023-11-13 00:15:33 +01:00
Dennis Schubert
744f5449fb
Merge branch 'next-minor' into develop 2023-07-10 01:19:08 +02:00
Dennis Schubert
42b835f0c0
Enforce an ImageMagick policy.xml for all pods.
This fix was heavily inspired by Mastodon's fix for GHSA-9928-3cp5-93fm.
So, thank you Cure53 for finding this issue, thank you Mozilla for
paying Cure53 to look into it, and thanks for Mastodon for fixing it.
2023-07-10 01:12:36 +02:00
Benjamin Neff
a59505574a
Bump sidekiq, sidekiq-cron and migrate to redis-client
This breaks compatibility with redis <6
2023-06-28 01:19:34 +02:00
Benjamin Neff
02182e3b59
Merge pull request #8421 from SuperTux88/cleanup-from-header-unicode-emojis
Cleanup unicode emojis from email headers
2023-06-10 17:26:48 +02:00
Benjamin Neff
dc9a18e24d
Cleanup unicode emojis from email headers
Some email providers (for example gmail) block emails if they have
emojis in the from header, as they could be confused with UI elements.
So the easy solution is to just filter all emojis from the name.

The normal `\p{Emoji}` selector also matches normal numbers, because of
the emoji-version of numbers (1️⃣), but the `\p{Emoji_Presentation}` then
doesn't match colored emojis anymore (❄️), so we need a mix of both to
find all emojis
2023-06-09 04:20:15 +02:00
Benjamin Neff
6f802417c6
Remove i18n-inflector-rails dependency
There are no new releases anymore and the current version isn't
compatible with ruby 3.x.

As this feature wasn't really used a lot (Icelandic didn't even setup
inflections properly), it's probably not worth fighting for it, so lets
just drop it.

Related to #8369
2023-06-09 01:13:16 +02:00
Benjamin Neff
ce32a7d16b
Merge pull request #8409 from tclaus/add_app_smart_banner
Add app smart banner to web site when using an iOS device
2023-06-04 21:38:34 +02:00
Benjamin Neff
11107ee637
Fix chrome parameters for running jasmine
Yes, I know this is a very ugly workaround, but it works ...

Chrome now requires to add `about:blank` as parameter to open and be
able to use remote debugging. The jasmine-gem isn't supported anymore,
and we need to switch to the `jasmine-browser-runner`, I was working on
that a few months ago, but ran into problems.

As the jasmine-gem doesn't allow to add parameters without `--` infront
of it, lets just add a dummy parameter and add the required
`about:blank` with a space after that. This is ugly, but works for now,
until we can upgrade to the new jasmine version. We could also just
replace the `nil` of the last parameter with that value, but I think
that way it's clearer that this is a workaround and how it works.
2023-06-04 17:10:51 +02:00
Benjamin Neff
763dffa328
Always strip exif data and drop user setting for it
Some imagemagick-versions (I tested Ubuntu 22.04 and debian bullseye)
always loose exif data when converting from jpg to webp. So this made
our CI fail now, but even if it wasn't failing before, some pods always
had and have versions which might loose the information anyway. So
having a setting to keep exif information is kinda pointless, if we
can't guarantee that the information isn't lost. Also, diaspora isn't a
photo sharing platform and we don't display exif information anywhere,
so I think we should just always strip exif data (which was already the
default before), as we don't need them.
2023-06-04 04:25:01 +02:00
Thorsten Claus
83a2274f47 Adding Smart App Banner for insporation on iOS devices 2022-11-17 23:20:35 +01:00
Benjamin Neff
b0b2083fea
Merge pull request #8407 from Flaburgan/4821-help-mobile
Tell users that there is no help in mobile version, allow to switch to desktop
2022-11-04 02:07:36 +01:00
flaburgan
3d84ae18a7 Tell users that there is no help in mobile version, allow to switch to desktop, fixes #4821 2022-11-02 23:27:58 +01:00
Benjamin Neff
80c0888176
Merge pull request #8403 from SuperTux88/cleanup-duplicate-pods-for-real-this-time
Cleanup duplicate pods
2022-11-01 21:17:17 +01:00
Benjamin Neff
acc76a383f
Merge pull request #8398 from SuperTux88/fix-mentions-with-underscores
Escape mentions before parsing message with markdown for mobile UI
2022-11-01 21:15:47 +01:00
Benjamin Neff
800f394870
Show ports on pods list
otherwise pods with different ports (or without port) all look the same,
like if they are duplicates
2022-10-31 01:45:13 +01:00
Benjamin Neff
8334eeeeff
Ensure pod urls are always lowercase
otherwise pods can exist multiple times with mixed case
2022-10-31 01:45:13 +01:00
Benjamin Neff
6bdf6f03b4
Cleanup duplicate pods in database
The unique index doesn't work when the port is `NULL`. So use `-1`
instead for when using the default ports (80/443), as if we would use
the real ports, we could still have both 80 and 443 in the database at
the same time.
2022-10-31 01:45:13 +01:00
Benjamin Neff
cbbb0a55c2
Add redirect to mobile-only photo URL when in desktop UI
This URL is only used in the mobile UI, but when somebody then copies
the link and sends it to somebody on the desktop UI, they don't see
anything. So lets just redirect to the post containing the photo, so
there is at least something to show.

If there is no linked post, just redirect to the image instead.

Fixes #8352
2022-10-30 00:32:31 +02:00
Benjamin Neff
536c96f217
Escape mentions before parsing message with markdown
Usernames that contained underscores were parsed by markdown first. This
broke the diaspora IDs and also added weird html at places where it
wasn't needed. Escaping them before sending the message through the
markdown parser fixes this issue.

As underscores are the only allowed character that can be used for
markdown that is also allowed inside a diaspora ID, this escaping can be
kept pretty simple.

This only fixes it for the mobile UI at the moment, for the desktop UI
it's probably better to fix it in markdown-it.

Related to #7975
2022-10-06 00:45:50 +02:00
Dennis Schubert
c47258a873
Don't time travel in check_birthday_spec 2022-09-20 03:20:48 +02:00
Dennis Schubert
6ddd16267a
Give queue_users_for_removal_spec a bit of allowance to accord for timezone changes 2022-09-10 23:22:34 +02:00
Benjamin Neff
7c450b4446
Merge pull request #8390 from cmrd-senya/improve-public-fetch
Improve public posts fetch on account search
2022-09-10 01:34:54 +02:00
Dennis Schubert
97cfc80a1f
Replace Unicorn with Puma
… and drop the single_process_mode. See the included Changelog entry
for full details on what this change means.
2022-09-09 04:33:37 +02:00
cmrd Senya
e77d785d9c post fetch: update spec to test reshares data too 2022-09-06 10:22:08 +03:00
cmrd Senya
a6e7c8e2d5 post fetch: update post fetch spec 2022-09-05 23:19:11 +03:00
cmrd Senya
f3c01d5a46 post fetch: remove check for type to allow fetching reshares 2022-09-04 23:28:43 +03:00
Benjamin Neff
a661b0b608
Merge branch 'next-minor' into develop 2022-07-24 17:22:41 +02:00
Benjamin Neff
646685b42c
Handle Faraday::ServerError (for example 502) as HTTPFailure
closes #8380
2022-07-24 17:20:21 +02:00
Benjamin Neff
78b28c3d54
Handle nodeinfo timeouts gracefully
some (especially bigger pods) are sometimes slow to respond with
statistics, so lets handle that gracefully and not mark the pods as
down.
2022-07-24 17:19:04 +02:00
Benjamin Neff
b29675fead
Remove error if there was no error anymore
also add pod uri when logging offline pods ... just having a bunch of
"OFFLINE" log messages doesn't help at all.
2022-07-24 17:17:51 +02:00
Benjamin Neff
eb1c571511
Add xmppChat to NodeInfo 2.1 test for 0.7.x
Follow up for #8379
2022-07-23 18:40:11 +02:00
Benjamin Neff
78ea344454
Merge branch 'next-minor' into develop 2022-07-23 17:01:02 +02:00
Benjamin Neff
01f8f55dbb
Add parsing of newer versions of NodeInfo
Always take the newest versions both nodes support
2022-07-23 16:59:41 +02:00