summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-07-10 10:37:42 +0000
committerlain <lain@soykaf.club>2020-07-10 10:37:42 +0000
commitfba1ee7d7b04730c33cadb036f59e8d7c90a93b0 (patch)
tree32b20b5a0ec3f5c8d44f1157087868adfaa549b0 /priv
parent8aa7143f464562ca2a0572087c526f26d1a3b7ef (diff)
parentb39eb6ecc573c310801fe49f35d92246ddcb6226 (diff)
downloadpleroma-fba1ee7d7b04730c33cadb036f59e8d7c90a93b0.tar.gz
pleroma-fba1ee7d7b04730c33cadb036f59e8d7c90a93b0.zip
Merge branch 'chat-federation-information' into 'develop'
Add an `accepts_chat_messages` to user, expose in api and federation See merge request pleroma/pleroma!2716
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20200703101031_add_chat_acceptance_to_users.exs17
-rw-r--r--priv/static/schemas/litepub-0.1.jsonld1
2 files changed, 18 insertions, 0 deletions
diff --git a/priv/repo/migrations/20200703101031_add_chat_acceptance_to_users.exs b/priv/repo/migrations/20200703101031_add_chat_acceptance_to_users.exs
new file mode 100644
index 000000000..8dfda89f1
--- /dev/null
+++ b/priv/repo/migrations/20200703101031_add_chat_acceptance_to_users.exs
@@ -0,0 +1,17 @@
+defmodule Pleroma.Repo.Migrations.AddChatAcceptanceToUsers do
+ use Ecto.Migration
+
+ def up do
+ alter table(:users) do
+ add(:accepts_chat_messages, :boolean, nullable: true)
+ end
+
+ execute("update users set accepts_chat_messages = true where local = true")
+ end
+
+ def down do
+ alter table(:users) do
+ remove(:accepts_chat_messages)
+ end
+ end
+end
diff --git a/priv/static/schemas/litepub-0.1.jsonld b/priv/static/schemas/litepub-0.1.jsonld
index 7cc3fee40..e7722cf72 100644
--- a/priv/static/schemas/litepub-0.1.jsonld
+++ b/priv/static/schemas/litepub-0.1.jsonld
@@ -13,6 +13,7 @@
},
"discoverable": "toot:discoverable",
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
+ "capabilities": "litepub:capabilities",
"ostatus": "http://ostatus.org#",
"schema": "http://schema.org#",
"toot": "http://joinmastodon.org/ns#",