aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/ostatus/handlers/note_handler.ex
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-07-29 16:30:47 +0000
committerlain <lain@soykaf.club>2019-07-29 16:30:47 +0000
commit1dfde4151ca096742da593160d33a629494c9f1c (patch)
tree8999d2c1ccdea93e55e1ac7961778bc8d9054873 /lib/pleroma/web/ostatus/handlers/note_handler.ex
parent3b8cd27b053e08bfb06a248033477efdb9e78684 (diff)
parentb93498eb5289dc92587b77c316ed9f697bb9e5c8 (diff)
downloadpleroma-1dfde4151ca096742da593160d33a629494c9f1c.tar.gz
Merge branch 'refactor/use-constants' into 'develop'
refactoring: begin to use constants See merge request pleroma/pleroma!1500
Diffstat (limited to 'lib/pleroma/web/ostatus/handlers/note_handler.ex')
-rw-r--r--lib/pleroma/web/ostatus/handlers/note_handler.ex5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pleroma/web/ostatus/handlers/note_handler.ex b/lib/pleroma/web/ostatus/handlers/note_handler.ex
index 8e0adad91..3005e8f57 100644
--- a/lib/pleroma/web/ostatus/handlers/note_handler.ex
+++ b/lib/pleroma/web/ostatus/handlers/note_handler.ex
@@ -4,6 +4,7 @@
defmodule Pleroma.Web.OStatus.NoteHandler do
require Logger
+ require Pleroma.Constants
alias Pleroma.Activity
alias Pleroma.Object
@@ -49,7 +50,7 @@ defmodule Pleroma.Web.OStatus.NoteHandler do
def get_collection_mentions(entry) do
transmogrify = fn
"http://activityschema.org/collection/public" ->
- "https://www.w3.org/ns/activitystreams#Public"
+ Pleroma.Constants.as_public()
group ->
group
@@ -126,7 +127,7 @@ defmodule Pleroma.Web.OStatus.NoteHandler do
to <- make_to_list(actor, mentions),
date <- XML.string_from_xpath("//published", entry),
unlisted <- XML.string_from_xpath("//mastodon:scope", entry) == "unlisted",
- cc <- if(unlisted, do: ["https://www.w3.org/ns/activitystreams#Public"], else: []),
+ cc <- if(unlisted, do: [Pleroma.Constants.as_public()], else: []),
note <-
CommonAPI.Utils.make_note_data(
actor.ap_id,