fedipub-moderation 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 617c50e1a0acf32db1ad3b68b9aff7d6fb35fa1a08b4301baf8cb8bcaa617d3c
|
|
4
|
+
data.tar.gz: 0aec8bcb399e8c85ab69d3c6f13d713e70680a3130ac1561204e7a5d07371da3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0cdeaa7774003ae88abbf26a408de99bf312cfb646ac7d686e8c9323753ca24a2c4121618694d63dd1aedb245ea68209c5109e4aa307ba0f378e8bf5b2bb89a4
|
|
7
|
+
data.tar.gz: 05ae26bbeded531b3830b6cdcdc87018a8fd378c23a19741e85f4c096f16f603cb697b0091f889337cae261431fff75dc50802a41054fe674f865d0a52c949cd
|
data/README.md
CHANGED
|
@@ -13,12 +13,12 @@ A gem that provides moderation capabilities for [Fedipub](https://gitlab.com/fed
|
|
|
13
13
|
* Block federation with particular servers
|
|
14
14
|
|
|
15
15
|
[!note]
|
|
16
|
-
This gem was previously called `federails-moderation`, but has changed name in line with the rename of Federails to Fedipub.
|
|
16
|
+
This gem was previously called `federails-moderation`, but has changed name in line with the rename of Federails to Fedipub. See the [Fedipub migration guide](https://gitlab.com/fedipub/fedipub/-/blob/main/MIGRATION_GUIDE.md#from-080-to-090) for details of the upgrade process.
|
|
17
17
|
|
|
18
18
|
## Requirements
|
|
19
19
|
|
|
20
|
-
* [Fedipub](https://gitlab.com/fedipub/fedipub) >= 0.
|
|
21
|
-
* Ruby >= 3.
|
|
20
|
+
* [Fedipub](https://gitlab.com/fedipub/fedipub) >= 0.11
|
|
21
|
+
* Ruby >= 3.3
|
|
22
22
|
|
|
23
23
|
## Installation
|
|
24
24
|
Add the gem to your Rails application:
|
|
@@ -30,7 +30,7 @@ Add the gem to your Rails application:
|
|
|
30
30
|
Then install the database migrations:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
>
|
|
33
|
+
> rake fedipub_moderation:install:migrations
|
|
34
34
|
> bin/rails db:migrate
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -2,7 +2,7 @@ module Fedipub::Moderation
|
|
|
2
2
|
class ReportCreationService < ApplicationService
|
|
3
3
|
def initialize(activity)
|
|
4
4
|
@activity = activity
|
|
5
|
-
|
|
5
|
+
Fedipub.logger.info "Report recieved: #{@activity.inspect}"
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
def call
|
|
@@ -33,7 +33,7 @@ module Fedipub::Moderation
|
|
|
33
33
|
nil
|
|
34
34
|
end
|
|
35
35
|
}.compact
|
|
36
|
-
|
|
36
|
+
Fedipub.logger.warn "Fedipub::Moderation cannot currently handle multiple objects in a single report, only the first has been logged" if objects.length > 1
|
|
37
37
|
objects
|
|
38
38
|
end
|
|
39
39
|
end
|
|
@@ -4,8 +4,8 @@ module Fedipub::Moderation
|
|
|
4
4
|
|
|
5
5
|
included do
|
|
6
6
|
class <<self
|
|
7
|
-
def filter_request(payload)
|
|
8
|
-
filtered_dispatch_request(payload) unless
|
|
7
|
+
def filter_request(payload, actor_id: nil)
|
|
8
|
+
filtered_dispatch_request(payload, actor_id: actor_id) unless
|
|
9
9
|
(payload["id"] && DomainBlock.blocked?(URI.parse(payload["id"]).host)) ||
|
|
10
10
|
(payload["actor"] && DomainBlock.blocked?(URI.parse(payload["actor"]).host))
|
|
11
11
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fedipub-moderation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Smith
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0.
|
|
33
|
+
version: '0.11'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0.
|
|
40
|
+
version: '0.11'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: public_suffix
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|