## [unreleased]
### Added
+- Digest email for inactive users
- Add a generic settings store for frontends / clients to use.
+ - Explicit addressing option for posting.
- Optional SSH access mode. (Needs `erlang-ssh` package on some distributions).
- [MongooseIM](https://github.com/esl/MongooseIM) http authentication support.
- LDAP authentication
- Configuration: `notify_email` option
- Configuration: Media proxy `whitelist` option
- Configuration: `report_uri` option
+- Configuration: `email_notifications` option
+ - Configuration: `limit_unauthenticated_to_local_content` option
- Pleroma API: User subscriptions
- Pleroma API: Healthcheck endpoint
- Pleroma API: `/api/v1/pleroma/mascot` per-user frontend mascot configuration endpoints
* `auth_template`: authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.eex`.
* `oauth_consumer_template`: OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.
- * `oauth_consumer_strategies`: the list of enabled OAuth consumer strategies; by default it's set by OAUTH_CONSUMER_STRATEGIES environment variable. Each entry in this space-delimited string should be of format `<strategy>` or `<strategy>:<dependency>` (e.g. `twitter` or `keycloak:ueberauth_keycloak_strategy` in case dependency is named differently than `ueberauth_<strategy>`).
+ * `oauth_consumer_strategies`: the list of enabled OAuth consumer strategies; by default it's set by `OAUTH_CONSUMER_STRATEGIES` environment variable. Each entry in this space-delimited string should be of format `<strategy>` or `<strategy>:<dependency>` (e.g. `twitter` or `keycloak:ueberauth_keycloak_strategy` in case dependency is named differently than `ueberauth_<strategy>`).
+## :email_notifications
+
+Email notifications settings.
+
+ - digest - emails of "what you've missed" for users who have been
+ inactive for a while.
+ - active: globally enable or disable digest emails
+ - schedule: When to send digest email, in [crontab format](https://en.wikipedia.org/wiki/Cron).
+ "0 0 * * 0" is the default, meaning "once a week at midnight on Sunday morning"
+ - interval: Minimum interval between digest emails to one user
+ - inactivity_threshold: Minimum user inactivity threshold
+
## OAuth consumer mode
OAuth consumer mode allows sign in / sign up via external OAuth providers (e.g. Twitter, Facebook, Google, Microsoft, etc.).
children =
[
# Start the Ecto repository
- supervisor(Pleroma.Repo, []),
- worker(Pleroma.Emoji, []),
- worker(Pleroma.Captcha, []),
- worker(
- Cachex,
- [
- :used_captcha_cache,
- [
- ttl_interval: :timer.seconds(Pleroma.Config.get!([Pleroma.Captcha, :seconds_valid]))
- ]
- ],
- id: :cachex_used_captcha_cache
- ),
- worker(
- Cachex,
- [
- :user_cache,
- [
- default_ttl: 25_000,
- ttl_interval: 1000,
- limit: 2500
- ]
- ],
- id: :cachex_user
- ),
- worker(
- Cachex,
- [
- :object_cache,
- [
- default_ttl: 25_000,
- ttl_interval: 1000,
- limit: 2500
- ]
- ],
- id: :cachex_object
- ),
- worker(
- Cachex,
- [
- :rich_media_cache,
- [
- default_ttl: :timer.minutes(120),
- limit: 5000
- ]
- ],
- id: :cachex_rich_media
- ),
- worker(
- Cachex,
- [
- :scrubber_cache,
- [
- limit: 2500
- ]
- ],
- id: :cachex_scrubber
- ),
- worker(
- Cachex,
- [
- :idempotency_cache,
- [
- expiration:
- expiration(
- default: :timer.seconds(6 * 60 * 60),
- interval: :timer.seconds(60)
- ),
- limit: 2500
- ]
- ],
- id: :cachex_idem
- ),
- worker(Pleroma.FlakeId, []),
- worker(Pleroma.ScheduledActivityWorker, []),
- worker(Pleroma.QuantumScheduler, [])
+ %{id: Pleroma.Repo, start: {Pleroma.Repo, :start_link, []}, type: :supervisor},
+ %{id: Pleroma.Emoji, start: {Pleroma.Emoji, :start_link, []}},
+ %{id: Pleroma.Captcha, start: {Pleroma.Captcha, :start_link, []}},
+ %{
+ id: :cachex_used_captcha_cache,
+ start:
+ {Cachex, :start_link,
+ [
+ :used_captcha_cache,
+ [
+ ttl_interval:
+ :timer.seconds(Pleroma.Config.get!([Pleroma.Captcha, :seconds_valid]))
+ ]
+ ]}
+ },
+ %{
+ id: :cachex_user,
+ start:
+ {Cachex, :start_link,
+ [
+ :user_cache,
+ [
+ default_ttl: 25_000,
+ ttl_interval: 1000,
+ limit: 2500
+ ]
+ ]}
+ },
+ %{
+ id: :cachex_object,
+ start:
+ {Cachex, :start_link,
+ [
+ :object_cache,
+ [
+ default_ttl: 25_000,
+ ttl_interval: 1000,
+ limit: 2500
+ ]
+ ]}
+ },
+ %{
+ id: :cachex_rich_media,
+ start:
+ {Cachex, :start_link,
+ [
+ :rich_media_cache,
+ [
+ default_ttl: :timer.minutes(120),
+ limit: 5000
+ ]
+ ]}
+ },
+ %{
+ id: :cachex_scrubber,
+ start:
+ {Cachex, :start_link,
+ [
+ :scrubber_cache,
+ [
+ limit: 2500
+ ]
+ ]}
+ },
+ %{
+ id: :cachex_idem,
+ start:
+ {Cachex, :start_link,
+ [
+ :idempotency_cache,
+ [
+ expiration:
+ expiration(
+ default: :timer.seconds(6 * 60 * 60),
+ interval: :timer.seconds(60)
+ ),
+ limit: 2500
+ ]
+ ]}
+ },
+ %{id: Pleroma.FlakeId, start: {Pleroma.FlakeId, :start_link, []}},
+ %{
+ id: Pleroma.ScheduledActivityWorker,
+ start: {Pleroma.ScheduledActivityWorker, :start_link, []}
++ },
++ %{
++ id: Pleroma.QuantumScheduler,
++ start: {Pleroma.QuantumScheduler, :start_link, []}
+ }
] ++
hackney_pool_children() ++
[
end
test "works with URIs" do
- [result] = User.search("http://mastodon.example.org/users/admin", resolve: true)
+ user = insert(:user)
+
- results =
++ [result] =
+ User.search("http://mastodon.example.org/users/admin", resolve: true, for_user: user)
+
- result = results |> List.first()
-
+ user = User.get_cached_by_ap_id("http://mastodon.example.org/users/admin")
- assert length(results) == 1
- assert user == result |> Map.put(:search_rank, nil) |> Map.put(:search_type, nil)
+ expected =
+ result
+ |> Map.put(:search_rank, nil)
+ |> Map.put(:search_type, nil)
+ |> Map.put(:last_digest_emailed_at, nil)
+
- user = User.get_cached_by_ap_id("http://mastodon.example.org/users/admin")
-
+ assert user == expected
end
end