aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-03-13 18:50:17 +0000
committerrinpatch <rinpatch@sdf.org>2020-03-13 18:50:17 +0000
commit994ac4357cb6c3f64a8889d3a98f9a3adbd37010 (patch)
tree13bd2a235d338a40c5e2a637b1b3fd476db8637a
parent658f30c0b3cc5403d1172a07adba8bdcd79eb82c (diff)
parentfffc382f138442035337e55eb930324d13bbdca8 (diff)
downloadpleroma-994ac4357cb6c3f64a8889d3a98f9a3adbd37010.tar.gz
Merge branch 'fix/hashtags-streaming' into 'develop'
Fix hashtags WebSocket streaming Closes #1593 See merge request pleroma/pleroma!2294
-rw-r--r--lib/pleroma/activity/ir/topics.ex2
-rw-r--r--test/activity/ir/topics_test.exs8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/pleroma/activity/ir/topics.ex b/lib/pleroma/activity/ir/topics.ex
index 4acc1a3e0..9e65bedad 100644
--- a/lib/pleroma/activity/ir/topics.ex
+++ b/lib/pleroma/activity/ir/topics.ex
@@ -39,7 +39,7 @@ defmodule Pleroma.Activity.Ir.Topics do
end
end
- defp item_creation_tags(tags, %{data: %{"type" => "Create"}} = object, activity) do
+ defp item_creation_tags(tags, object, %{data: %{"type" => "Create"}} = activity) do
tags ++ hashtags_to_topics(object) ++ attachment_topics(object, activity)
end
diff --git a/test/activity/ir/topics_test.exs b/test/activity/ir/topics_test.exs
index e75f83586..44aec1e19 100644
--- a/test/activity/ir/topics_test.exs
+++ b/test/activity/ir/topics_test.exs
@@ -59,8 +59,8 @@ defmodule Pleroma.Activity.Ir.TopicsTest do
describe "public visibility create events" do
setup do
activity = %Activity{
- object: %Object{data: %{"type" => "Create", "attachment" => []}},
- data: %{"to" => [Pleroma.Constants.as_public()]}
+ object: %Object{data: %{"attachment" => []}},
+ data: %{"type" => "Create", "to" => [Pleroma.Constants.as_public()]}
}
{:ok, activity: activity}
@@ -98,8 +98,8 @@ defmodule Pleroma.Activity.Ir.TopicsTest do
describe "public visibility create events with attachments" do
setup do
activity = %Activity{
- object: %Object{data: %{"type" => "Create", "attachment" => ["foo"]}},
- data: %{"to" => [Pleroma.Constants.as_public()]}
+ object: %Object{data: %{"attachment" => ["foo"]}},
+ data: %{"type" => "Create", "to" => [Pleroma.Constants.as_public()]}
}
{:ok, activity: activity}