diff --git a/.sobelow-skips b/.sobelow-skips index eb69fdfc..3ce31fbb 100644 --- a/.sobelow-skips +++ b/.sobelow-skips @@ -3,13 +3,13 @@ 1C29EE70E90ECED01AF28EC58D2575B5 31CE26BC979C57B9E3CC97B40C290CE5 3529E7A4CECC24D02678820E6F521162 -4A4B7002DEB734A943B467DF7D2BD1AA +37E854EA3BDF7275C6A7631F80804EC4 4E7C044C59E0BCB76AA826789998F624 53CBBEB6243FAF5C37249CBA17DE6F4C -5804C3D68F833A3E8D258C0704DEE775 5BCE3651A03711295046DE48BDFE007E +5C16A2AE6A24E4795F95DDE20EEC458E +5C4CED447689F00D9D1ACEB9B895ED29 630C0972985257251EDF89A7117DE423 -81BAE1F18B4148E83C3265F81FFA6F5C 94ACF7B17C3FF42F64E57DD1DA936BD8 A32E125003F1EDFAD95C487C6A969725 ACF6272A1DBB3A2ABD96C0C120B5CA69 diff --git a/lib/graphql/resolvers/conversation.ex b/lib/graphql/resolvers/conversation.ex index 33c76c33..5c76683c 100644 --- a/lib/graphql/resolvers/conversation.ex +++ b/lib/graphql/resolvers/conversation.ex @@ -29,7 +29,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Conversation do if Actors.is_member?(actor_id, attributed_to_id) do {:ok, event_id - |> Conversations.find_conversations_for_event(actor_id, page, limit) + |> Conversations.find_conversations_for_event(attributed_to_id, page, limit) |> conversation_participant_to_view()} else {:ok, %Page{total: 0, elements: []}} diff --git a/lib/service/formatter/text.ex b/lib/service/formatter/text.ex index 140502f1..2a46e9f4 100644 --- a/lib/service/formatter/text.ex +++ b/lib/service/formatter/text.ex @@ -13,16 +13,15 @@ defmodule Mobilizon.Service.Formatter.Text do def paragraph(string, max_line_length, prefix \\ "") do string |> String.split("\n\n", trim: true) - |> Enum.map(&subparagraph(&1, max_line_length, prefix)) - |> Enum.join("\n#{prefix}\n") + |> Enum.map_join("\n#{prefix}\n", &subparagraph(&1, max_line_length, prefix)) end defp subparagraph(string, max_line_length, prefix) do [word | rest] = String.split(string, ~r/\s+/, trim: true) - lines_assemble(rest, max_line_length - String.length(prefix), String.length(word), word, []) - |> Enum.map(&"#{prefix}#{&1}") - |> Enum.join("\n") + rest + |> lines_assemble(max_line_length - String.length(prefix), String.length(word), word, []) + |> Enum.map_join("\n", &"#{prefix}#{&1}") end defp lines_assemble([], _, _, line, acc), do: [line | acc] |> Enum.reverse() diff --git a/src/components/Conversations/AnnouncementListItem.vue b/src/components/Conversations/AnnouncementListItem.vue new file mode 100644 index 00000000..8d49311e --- /dev/null +++ b/src/components/Conversations/AnnouncementListItem.vue @@ -0,0 +1,97 @@ + + diff --git a/src/components/Conversations/EventConversations.vue b/src/components/Conversations/EventConversations.vue index 77139b99..83aa2c69 100644 --- a/src/components/Conversations/EventConversations.vue +++ b/src/components/Conversations/EventConversations.vue @@ -2,18 +2,10 @@
-

{{ t("Conversations") }}

- +

{{ t("Announcements") }}

- @@ -30,15 +22,14 @@ >
- - {{ t("There's no conversations yet") }} + + {{ t("There's no announcements yet") }}