Commit Graph

193 Commits

Author SHA1 Message Date
lain e853cfe7c3 Revert "Merge branch 'copyright-bump' into 'develop'"
This reverts merge request !3825
2023-01-02 20:38:50 +00:00
marcin mikołajczak 10886eeaa2 Bump copyright year
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-01-01 12:13:06 +01:00
Sean King 60df2d8a97
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into fine_grained_moderation_privileges 2022-12-18 22:03:48 -07:00
Haelwenn 299255b9bb Merge branch 'from/upstream-develop/tusooa/assoc-object-id' into 'develop'
Add function to calculate associated object id

Closes #2307

See merge request pleroma/pleroma!3692
2022-09-03 02:50:40 +00:00
Tusooa Zhu 3885ee182a
Switch to associated_object_id index 2022-08-20 20:43:46 -04:00
Ilja 37fdf148b0 Rename privilege tags
I first focussed on getting things working
Now that they do and we know what tags there are, I put some thought in providing better names

I use the form <what_it_controls>_<what_it_allows_you_to_do>

:statuses_read    => :messages_read
:status_delete    => :messages_delete

:user_read        => :users_read
:user_deletion    => :users_delete
:user_activation  => :users_manage_activation_state
:user_invite      => :users_manage_invites
:user_tag         => :users_manage_tags
:user_credentials => :users_manage_credentials

:report_handle    => :reports_manage_reports

:emoji_management => :emoji_manage_emoji
2022-07-01 10:28:09 +02:00
Ilja e21ef5aef3 report notifications for privileged users
Instead of `Pleroma.User.all_superusers()` we now use `Pleroma.User.all_superusers(:report_handle)`

I also changed it for sending emails, but there were no tests.
2022-06-21 12:10:27 +02:00
Ilja e45faddb38 Revert "Delete report notifs when demoting from superuser"
This reverts commit 89667189b8 and cdc5bbe836.

This is a side effect when changing user role.
The goal was to not have report notifications when someone isn't admin or moderator any more.
But this won't be triggered when we change the privilege tags for a role, so we can't use this sollution any more.
There was another solution to filter out report notifications during fetch.
It wasn't merged because this seemed 'cleaner' at the time, but now it seems the better sollution.
I'll add it in the next commit.
2022-06-21 12:10:27 +02:00
Tusooa Zhu d2d3532e5f
Lint 2022-06-05 16:35:01 -04:00
Tusooa Zhu 06a3998013
Create Update notifications 2022-06-05 15:02:25 -04:00
Haelwenn b76340511d Merge branch 'delete_report_notifs_when_demoting_from_superuser' into 'develop'
Delete report notifs when demoting from superuser

Closes #2840

See merge request pleroma/pleroma!3642
2022-03-20 18:13:19 +00:00
Ilja 89667189b8 Delete report notifs when demoting from superuser
When someone isn't a superuser any more, they shouldn't see the reporsts any more either.
Here we delete the report notifications from a user when that user gets updated from being a superuser to a non-superuser.
2022-03-06 17:36:30 +01:00
Sean King 17aa3644be
Copyright bump for 2022 2022-02-25 23:11:42 -07:00
lain e2772d6bf1 Merge branch 'block-behavior' into 'develop'
Configurable block visibility, fixes #2123

Closes #2123

See merge request pleroma/pleroma!3242
2021-11-15 14:27:59 +00:00
Alex Gleason 70f1496eb8
Poll notification: only notify local users 2021-07-18 11:10:23 -05:00
Alex Gleason cbd1a10c16
Poll notification: notify for polls even when block_from_strangers is set 2021-07-18 11:10:04 -05:00
Alex Gleason 0114754db2
MastodonAPI: Support poll notification 2021-07-17 22:19:38 -05:00
Alex Gleason 762be6ce10
Merge remote-tracking branch 'upstream/develop' into block-behavior 2021-04-29 11:14:32 -05:00
Ivan Tashkinov 284504f689 [#2053] Changed `Notification/for_user_query/2` to use join to filter out inactive actors instead of subselect of _all_ inactive AP ids from `users`. 2021-02-15 09:08:04 +03:00
Mark Felder 76f732766b Exclude reporter from receiving notifications from their own reports.
Currently only works if the reporting actor is an admin, but if we include
moderators with those who receive notification reports it will work for them.
2021-02-03 12:32:44 -06:00
Mark Felder 860b5c7804 Change user.deactivated field to user.is_active 2021-01-15 11:24:46 -06:00
Haelwenn (lanodan) Monnier c4439c630f
Bump Copyright to 2021
grep -rl '# Copyright © .* Pleroma' * | xargs sed -i 's;Copyright © .* Pleroma .*;Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>;'
2021-01-13 07:49:50 +01:00
Alex Gleason cc09079aea
Exclude blockers from notifications when `blockers_visible: false` 2021-01-06 15:39:14 -06:00
lain e1e7e4d379 Object: Rework how Object.normalize works
Now it defaults to not fetching, and the option is named.
2021-01-04 13:38:31 +01:00
Ilja 70e4b86250 Make notifs view work for reports
* These are the first small steps for issue 2034 "Reports should send a notification to admins".
* I added a new type of notification "pleroma:report" to the the database manually (a migration will need to be written later)
* I added the new type to the notification_controller
* I made the view return the notification. It doesn't include the report itself (yet)
2020-11-13 13:35:46 +00:00
lain d91c4feebe Notification: Small refactor. 2020-08-31 11:02:54 +02:00
Maksim Pechnikov f0fefc4f5c marks notifications as read after mute 2020-08-28 18:17:44 +03:00
Sergey Suprunenko 25c69e271a
Make notifications about new statuses from muted threads read 2020-08-17 00:11:33 +02:00
Sergey Suprunenko 0865f36965
Mark notifications about statuses from muted users as read automatically 2020-08-15 15:27:41 +02:00
Mark Felder 80c21100db Merge branch 'develop' into refactor/notification_settings 2020-07-13 13:32:21 -05:00
lain 29fa75d00d Notification: For follows, notify the followed. 2020-07-08 14:29:29 +02:00
Alexander Strizhakov 20c27bef40
renaming back and reject nil on create 2020-07-06 09:30:42 +03:00
Alexander Strizhakov 6558f31cda
don't filter notifications for follow and move types 2020-07-06 09:30:41 +03:00
Sergey Suprunenko 5af1bf443d
Skip notifications for statuses that contain an irreversible filtered word 2020-07-06 09:28:22 +03:00
lain 09c5991f82 Apply suggestion to lib/pleroma/notification.ex 2020-06-29 16:04:14 +00:00
lain 90083a754d Notifications: Never return `nil` in the notification list. 2020-06-29 17:48:18 +02:00
Mark Felder fd5e797379 Simplify notification filtering settings further 2020-06-26 11:24:28 -05:00
Mark Felder 433c01b370 Merge branch 'develop' into refactor/notification_settings 2020-06-25 14:26:21 -05:00
eugenijm b15cfc3d36 Mastodon API: ensure the notification endpoint doesn't return less than the requested amount of records unless it's the last page 2020-06-14 18:27:11 +03:00
lain fc04a138d4 Apply suggestion to lib/pleroma/notification.ex 2020-06-08 20:01:37 +00:00
lain 40fc4e974e Notfication: Add validation of notification types 2020-06-06 16:59:08 +02:00
lain 9189b489ee Migrations: Move Notification migration code to helper 2020-06-06 15:33:02 +02:00
lain 9fa3f0b156 Notification: Change type of `type` to an enum. 2020-06-06 13:08:45 +02:00
lain 115d08a754 Pipeline: Add a side effects step after the transaction finishes
This is to run things like streaming notifications out, which will
sometimes need data that is created by the transaction, but is
streamed out asynchronously.
2020-06-05 16:47:02 +02:00
lain aa2ac76510 Notification: Don't break on figuring out the type of old EmojiReactions 2020-06-04 20:40:46 +02:00
lain e46aecda55 Notification: Fix notifications backfill for compacted activities 2020-06-03 20:51:59 +02:00
lain 2c6ebe709a Credo fixes 2020-06-02 15:14:52 +02:00
lain 6cd2fa2a4c Migrations: Add a migration to backfill notification types. 2020-06-02 15:13:19 +02:00
lain 38dce485c4 Notification: Add function to backfill notification types 2020-06-02 14:50:10 +02:00
lain 805ab86933 Notifications: Make notifications save their type. 2020-06-02 13:24:34 +02:00