Merge branch 'fixes_1957_add_option_to_send_user_chatmessage_instead_of_dm' into...
authorlain <lain@soykaf.club>
Mon, 3 Aug 2020 21:01:56 +0000 (21:01 +0000)
committerlain <lain@soykaf.club>
Mon, 3 Aug 2020 21:01:56 +0000 (21:01 +0000)
fixes 1957 Add option to send user chatmessage instead of dm

Closes #1957

See merge request pleroma/pleroma!2782

1  2 
config/config.exs
config/description.exs
docs/configuration/cheatsheet.md

diff --combined config/config.exs
index 6acb38051859306cc4e54755a1c01928f6421bd7,c0213612bbf5ad49112ec0fc0678125423015159..fa8051e402344a22c40daf2477906a339384fdd4
@@@ -261,6 -261,11 +261,11 @@@ config :pleroma, :welcome
      sender_nickname: nil,
      message: nil
    ],
+   chat_message: [
+     enabled: false,
+     sender_nickname: nil,
+     message: nil
+   ],
    email: [
      enabled: false,
      sender: nil,
@@@ -374,7 -379,6 +379,7 @@@ config :pleroma, :mrf_simple
    federated_timeline_removal: [],
    report_removal: [],
    reject: [],
 +  followers_only: [],
    accept: [],
    avatar_removal: [],
    banner_removal: [],
@@@ -393,9 -397,8 +398,9 @@@ config :pleroma, :mrf_vocabulary
    accept: [],
    reject: []
  
 +# threshold of 7 days
  config :pleroma, :mrf_object_age,
 -  threshold: 172_800,
 +  threshold: 604_800,
    actions: [:delist, :strip_followers]
  
  config :pleroma, :rich_media,
@@@ -721,7 -724,7 +726,7 @@@ config :pleroma, :restrict_unauthentica
  config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
  
  config :pleroma, :mrf,
 -  policies: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
 +  policies: Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
    transparency: true,
    transparency_exclusions: []
  
diff --combined config/description.exs
index d623a9f75f3d3a110f755e61600daaea820ce75e,439f17fd73019dc08f6ab0ad6eef998faf25201a..ae2f6d23fd68322e9ba69af2eb8fcc692b7b8f37
@@@ -997,6 -997,35 +997,35 @@@ config :pleroma, :config_description, 
            }
          ]
        },
+       %{
+         group: :chat_message,
+         type: :group,
+         descpiption: "Chat message settings",
+         children: [
+           %{
+             key: :enabled,
+             type: :boolean,
+             description: "Enables sends chat message for new user after registration"
+           },
+           %{
+             key: :message,
+             type: :string,
+             description:
+               "A message that will be sent to a newly registered users as a chat message",
+             suggestions: [
+               "Hello, welcome on board!"
+             ]
+           },
+           %{
+             key: :sender_nickname,
+             type: :string,
+             description: "The nickname of the local user that sends the welcome message",
+             suggestions: [
+               "lain"
+             ]
+           }
+         ]
+       },
        %{
          group: :email,
          type: :group,
          description: "List of instances to only accept activities from (except deletes)",
          suggestions: ["example.com", "*.example.com"]
        },
 +      %{
 +        key: :followers_only,
 +        type: {:list, :string},
 +        description: "Force posts from the given instances to be visible by followers only",
 +        suggestions: ["example.com", "*.example.com"]
 +      },
        %{
          key: :report_removal,
          type: {:list, :string},
index 7de82a41d4a1b375b4fd15f8a295fe7c852eedde,59c3fb06dd8b3300d76b69b5330cc10e600e5318..5891fc9b0fe569dd0a7022804c92e5cef8d772d0
@@@ -69,6 -69,10 +69,10 @@@ To add configuration to your config fil
    * `enabled`: Enables the send a direct message to a newly registered user. Defaults to `false`.
    * `sender_nickname`: The nickname of the local user that sends the welcome message.
    * `message`: A message that will be send to a newly registered users as a direct message.
+ * `chat_message`: - welcome message sent as a chat message.
+   * `enabled`: Enables the send a chat message to a newly registered user. Defaults to `false`.
+   * `sender_nickname`: The nickname of the local user that sends the welcome message.
+   * `message`: A message that will be send to a newly registered users as a chat message.
  * `email`: - welcome message sent as a email.
    * `enabled`: Enables the send a welcome email to a newly registered user. Defaults to `false`.
    * `sender`: The email address or tuple with `{nickname, email}` that will use as sender to the welcome email.
  * `federated_timeline_removal`: List of instances to remove from Federated (aka The Whole Known Network) Timeline.
  * `reject`: List of instances to reject any activities from.
  * `accept`: List of instances to accept any activities from.
 +* `followers_only`: List of instances to decrease post visibility to only the followers, including for DM mentions.
  * `report_removal`: List of instances to reject reports from.
  * `avatar_removal`: List of instances to strip avatars from.
  * `banner_removal`: List of instances to strip banners from.