correction about Phoenix upgrade - #1814
This commit is contained in:
@@ -11,7 +11,7 @@ defmodule Mobilizon.Service.Formatter do
|
|||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Federation.ActivityPub.Actor, as: ActivityPubActor
|
alias Mobilizon.Federation.ActivityPub.Actor, as: ActivityPubActor
|
||||||
alias Mobilizon.Service.Formatter.HTML
|
alias Mobilizon.Service.Formatter.HTML
|
||||||
alias Phoenix.HTML.Tag
|
alias PhoenixHTMLHelpers.Tag
|
||||||
|
|
||||||
alias Mobilizon.Web.Endpoint
|
alias Mobilizon.Web.Endpoint
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Actors.Actor do
|
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Actors.Actor do
|
||||||
alias Phoenix.HTML
|
alias Phoenix.HTML
|
||||||
alias Phoenix.HTML.Tag
|
alias PhoenixHTMLHelpers.Tag
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Web.JsonLD.ObjectView
|
alias Mobilizon.Web.JsonLD.ObjectView
|
||||||
use Mobilizon.Web, :verified_routes
|
use Mobilizon.Web, :verified_routes
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Discussions.Comment do
|
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Discussions.Comment do
|
||||||
alias Phoenix.HTML.Tag
|
alias PhoenixHTMLHelpers.Tag
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Discussions.Comment
|
alias Mobilizon.Discussions.Comment
|
||||||
import Mobilizon.Service.Metadata.Utils, only: [escape_text: 1]
|
import Mobilizon.Service.Metadata.Utils, only: [escape_text: 1]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Events.Event do
|
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Events.Event do
|
||||||
alias Phoenix.HTML
|
alias Phoenix.HTML
|
||||||
alias Phoenix.HTML.Tag
|
alias PhoenixHTMLHelpers.Tag
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Addresses.Address
|
alias Mobilizon.Addresses.Address
|
||||||
alias Mobilizon.Events.{Event, EventOptions}
|
alias Mobilizon.Events.{Event, EventOptions}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ defmodule Mobilizon.Service.Metadata.Instance do
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
alias Phoenix.HTML
|
alias Phoenix.HTML
|
||||||
alias Phoenix.HTML.Tag
|
alias PhoenixHTMLHelpers.Tag
|
||||||
|
|
||||||
alias Mobilizon.Config
|
alias Mobilizon.Config
|
||||||
alias Mobilizon.Service.Metadata.Utils
|
alias Mobilizon.Service.Metadata.Utils
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Posts.Post do
|
defimpl Mobilizon.Service.Metadata, for: Mobilizon.Posts.Post do
|
||||||
alias Phoenix.HTML
|
alias Phoenix.HTML
|
||||||
alias Phoenix.HTML.Tag
|
alias PhoenixHTMLHelpers.Tag
|
||||||
alias Mobilizon.Actors.Actor
|
alias Mobilizon.Actors.Actor
|
||||||
alias Mobilizon.Medias.{File, Media}
|
alias Mobilizon.Medias.{File, Media}
|
||||||
alias Mobilizon.Posts.Post
|
alias Mobilizon.Posts.Post
|
||||||
|
|||||||
@@ -45,7 +45,8 @@
|
|||||||
>
|
>
|
||||||
<p style="margin: 0;">
|
<p style="margin: 0;">
|
||||||
{gettext(
|
{gettext(
|
||||||
"Hi there! You just registered to join this event: « <b>%{title}</b> ». Please confirm the e-mail address you provided:",
|
"Hi there! You just registered to join this event: « <b>%{title}</b>
|
||||||
|
». Please confirm the e-mail address you provided:",
|
||||||
title: escape_html(@participant.event.title)
|
title: escape_html(@participant.event.title)
|
||||||
)
|
)
|
||||||
|> raw}
|
|> raw}
|
||||||
|
|||||||
@@ -187,8 +187,7 @@
|
|||||||
{gettext("<b>%{instance}</b> is powered by Mobilizon.",
|
{gettext("<b>%{instance}</b> is powered by Mobilizon.",
|
||||||
instance: @instance_name
|
instance: @instance_name
|
||||||
)
|
)
|
||||||
|> raw}
|
|> raw} <br />
|
||||||
<br />
|
|
||||||
<a href="https://mobilizon.org">
|
<a href="https://mobilizon.org">
|
||||||
{gettext("Learn more about Mobilizon here!")}
|
{gettext("Learn more about Mobilizon here!")}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -48,7 +48,8 @@
|
|||||||
>
|
>
|
||||||
<p style="margin: 0;">
|
<p style="margin: 0;">
|
||||||
{gettext(
|
{gettext(
|
||||||
"Your instance's moderation team has decided to suspend <b>%{group_name}</b> (%{group_address}). You are no longer a member of this group.",
|
"Your instance's moderation team has decided to suspend <b>%{group_name}</b>
|
||||||
|
(%{group_address}). You are no longer a member of this group.",
|
||||||
group_name: escape_html(display_name(@group)),
|
group_name: escape_html(display_name(@group)),
|
||||||
group_address: preferred_username_and_domain(@group)
|
group_address: preferred_username_and_domain(@group)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -47,8 +47,7 @@
|
|||||||
{gettext("<b>%{name}</b> just requested to follow your instance.",
|
{gettext("<b>%{name}</b> just requested to follow your instance.",
|
||||||
name: escape_html(display_name_and_username(@follower))
|
name: escape_html(display_name_and_username(@follower))
|
||||||
)
|
)
|
||||||
|> raw}
|
|> raw} <br />
|
||||||
<br />
|
|
||||||
<%= if @follower.type == :Application do %>
|
<%= if @follower.type == :Application do %>
|
||||||
{gettext("If you accept, this instance will receive all of your public events.")}
|
{gettext("If you accept, this instance will receive all of your public events.")}
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|||||||
@@ -45,7 +45,8 @@
|
|||||||
>
|
>
|
||||||
<p style="margin: 0;">
|
<p style="margin: 0;">
|
||||||
{gettext(
|
{gettext(
|
||||||
"You created an account on <b>%{host}</b> with this email address. You are one click away from activating it.",
|
"You created an account on <b>%{host}</b>
|
||||||
|
with this email address. You are one click away from activating it.",
|
||||||
host: @instance_name
|
host: @instance_name
|
||||||
)
|
)
|
||||||
|> raw}
|
|> raw}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ defmodule Mobilizon.Web.AuthView do
|
|||||||
use Mobilizon.Web, :view
|
use Mobilizon.Web, :view
|
||||||
alias Mobilizon.Service.Metadata.Instance
|
alias Mobilizon.Service.Metadata.Instance
|
||||||
alias Mobilizon.Web.PageView
|
alias Mobilizon.Web.PageView
|
||||||
alias Phoenix.HTML.Tag
|
alias PhoenixHTMLHelpers.Tag
|
||||||
|
|
||||||
@spec render(String.t(), map()) :: String.t() | Plug.Conn.t()
|
@spec render(String.t(), map()) :: String.t() | Plug.Conn.t()
|
||||||
def render(
|
def render(
|
||||||
|
|||||||
@@ -3,10 +3,6 @@ defmodule Mobilizon.Web.ErrorHelpers do
|
|||||||
Conveniences for translating and building error messages.
|
Conveniences for translating and building error messages.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import Phoenix.HTML
|
|
||||||
import Phoenix.HTML.Form
|
|
||||||
use PhoenixHTMLHelpers
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Translates an error message using gettext.
|
Translates an error message using gettext.
|
||||||
"""
|
"""
|
||||||
|
|||||||
1
mix.exs
1
mix.exs
@@ -244,6 +244,7 @@ defmodule Mobilizon.Mixfile do
|
|||||||
{:doctor, "~> 0.21", only: :dev},
|
{:doctor, "~> 0.21", only: :dev},
|
||||||
{:haversine, "~> 0.1.0"},
|
{:haversine, "~> 0.1.0"},
|
||||||
{:ecto_dev_logger, "~> 0.7"},
|
{:ecto_dev_logger, "~> 0.7"},
|
||||||
|
{:castore, "~> 1.0"},
|
||||||
{:credo_code_climate, "~> 0.1.0", only: [:dev, :test]}
|
{:credo_code_climate, "~> 0.1.0", only: [:dev, :test]}
|
||||||
] ++ oauth_deps()
|
] ++ oauth_deps()
|
||||||
end
|
end
|
||||||
|
|||||||
20
package-lock.json
generated
20
package-lock.json
generated
@@ -1932,9 +1932,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@csstools/css-syntax-patches-for-csstree": {
|
"node_modules/@csstools/css-syntax-patches-for-csstree": {
|
||||||
"version": "1.0.16",
|
"version": "1.0.17",
|
||||||
"resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.0.16.tgz",
|
"resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.0.17.tgz",
|
||||||
"integrity": "sha512-2SpS4/UaWQaGpBINyG5ZuCHnUDeVByOhvbkARwfmnfxDvTaj80yOI1cD8Tw93ICV5Fx4fnyDKWQZI1CDtcWyUg==",
|
"integrity": "sha512-LCC++2h8pLUSPY+EsZmrrJ1EOUu+5iClpEiDhhdw3zRJpPbABML/N5lmRuBHjxtKm9VnRcsUzioyD0sekFMF0A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -7564,16 +7564,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-plugin-vue": {
|
"node_modules/eslint-plugin-vue": {
|
||||||
"version": "10.5.1",
|
"version": "10.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-10.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-10.6.0.tgz",
|
||||||
"integrity": "sha512-SbR9ZBUFKgvWAbq3RrdCtWaW0IKm6wwUiApxf3BVTNfqUIo4IQQmreMg2iHFJJ6C/0wss3LXURBJ1OwS/MhFcQ==",
|
"integrity": "sha512-TsoFluWxOpsJlE/l2jJygLQLWBPJ3Qdkesv7tBIunICbTcG0dS1/NBw/Ol4tJw5kHWlAVds4lUmC29/vlPUcEQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.4.0",
|
"@eslint-community/eslint-utils": "^4.4.0",
|
||||||
"natural-compare": "^1.4.0",
|
"natural-compare": "^1.4.0",
|
||||||
"nth-check": "^2.1.1",
|
"nth-check": "^2.1.1",
|
||||||
"postcss-selector-parser": "^6.0.15",
|
"postcss-selector-parser": "^7.1.0",
|
||||||
"semver": "^7.6.3",
|
"semver": "^7.6.3",
|
||||||
"xml-name-validator": "^4.0.0"
|
"xml-name-validator": "^4.0.0"
|
||||||
},
|
},
|
||||||
@@ -7596,9 +7596,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-plugin-vue/node_modules/postcss-selector-parser": {
|
"node_modules/eslint-plugin-vue/node_modules/postcss-selector-parser": {
|
||||||
"version": "6.1.2",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz",
|
||||||
"integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
|
"integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.UtilsTest do
|
|||||||
Module to test converting from EventMetadata to AS
|
Module to test converting from EventMetadata to AS
|
||||||
"""
|
"""
|
||||||
use Mobilizon.DataCase
|
use Mobilizon.DataCase
|
||||||
import Mobilizon.Factory
|
|
||||||
alias Mobilizon.Federation.ActivityStream.Converter.Utils
|
alias Mobilizon.Federation.ActivityStream.Converter.Utils
|
||||||
|
|
||||||
describe "get_medias/1" do
|
describe "get_medias/1" do
|
||||||
|
|||||||
@@ -1418,7 +1418,7 @@ defmodule Mobilizon.GraphQL.Resolvers.ParticipantTest do
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
test "No participate if not logging", %{conn: conn, actor: actor, event: event} do
|
test "No participate if not logging", %{conn: conn, event: event} do
|
||||||
res =
|
res =
|
||||||
conn
|
conn
|
||||||
|> AbsintheHelpers.graphql_query(
|
|> AbsintheHelpers.graphql_query(
|
||||||
@@ -1577,7 +1577,6 @@ defmodule Mobilizon.GraphQL.Resolvers.ParticipantTest do
|
|||||||
test "participates for group event where user is member (not allowed)", %{
|
test "participates for group event where user is member (not allowed)", %{
|
||||||
conn: conn,
|
conn: conn,
|
||||||
actor: actor,
|
actor: actor,
|
||||||
user: user,
|
|
||||||
event: event
|
event: event
|
||||||
} do
|
} do
|
||||||
user_group = insert(:user)
|
user_group = insert(:user)
|
||||||
@@ -1613,7 +1612,6 @@ defmodule Mobilizon.GraphQL.Resolvers.ParticipantTest do
|
|||||||
test "participates for group event where user is member (but allowed)", %{
|
test "participates for group event where user is member (but allowed)", %{
|
||||||
conn: conn,
|
conn: conn,
|
||||||
actor: actor,
|
actor: actor,
|
||||||
user: user,
|
|
||||||
event: event
|
event: event
|
||||||
} do
|
} do
|
||||||
user_group = insert(:user)
|
user_group = insert(:user)
|
||||||
|
|||||||
@@ -418,6 +418,7 @@ defmodule Mobilizon.GraphQL.Resolvers.UserTest do
|
|||||||
password: "long password",
|
password: "long password",
|
||||||
moderation: ""
|
moderation: ""
|
||||||
}
|
}
|
||||||
|
@moderation_empty ""
|
||||||
|
|
||||||
test "test create_user/3 creates an user",
|
test "test create_user/3 creates an user",
|
||||||
%{conn: conn} do
|
%{conn: conn} do
|
||||||
@@ -1337,7 +1338,6 @@ defmodule Mobilizon.GraphQL.Resolvers.UserTest do
|
|||||||
|
|
||||||
describe "Resolver: Change password for an user" do
|
describe "Resolver: Change password for an user" do
|
||||||
@email "toto@tata.tld"
|
@email "toto@tata.tld"
|
||||||
@moderation_fill "moderation text"
|
|
||||||
@moderation_empty ""
|
@moderation_empty ""
|
||||||
@old_password "p4ssw0rd"
|
@old_password "p4ssw0rd"
|
||||||
@new_password "upd4t3d"
|
@new_password "upd4t3d"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ defmodule Mobilizon.ActorsTest do
|
|||||||
alias Mobilizon.Discussions.Comment
|
alias Mobilizon.Discussions.Comment
|
||||||
alias Mobilizon.Events.Event
|
alias Mobilizon.Events.Event
|
||||||
alias Mobilizon.Federation.ActivityPub.Actor, as: ActivityPubActor
|
alias Mobilizon.Federation.ActivityPub.Actor, as: ActivityPubActor
|
||||||
alias Mobilizon.Medias.File, as: FileModel
|
# alias Mobilizon.Medias.File, as: FileModel
|
||||||
alias Mobilizon.Service.HTTP.ActivityPub.Mock
|
alias Mobilizon.Service.HTTP.ActivityPub.Mock
|
||||||
alias Mobilizon.Service.Workers
|
alias Mobilizon.Service.Workers
|
||||||
alias Mobilizon.Storage.Page
|
alias Mobilizon.Storage.Page
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ defmodule Mobilizon.Service.Metadata.UtilsTest do
|
|||||||
|
|
||||||
describe "stringify_tags/1" do
|
describe "stringify_tags/1" do
|
||||||
test "converts tags to string" do
|
test "converts tags to string" do
|
||||||
alias Phoenix.HTML.Tag
|
alias PhoenixHTMLHelpers.Tag
|
||||||
|
|
||||||
tag_1 = Tag.tag(:meta, property: "og:url", content: "one")
|
tag_1 = Tag.tag(:meta, property: "og:url", content: "one")
|
||||||
tag_2 = "<meta content=\"two\" property=\"og:url\">"
|
tag_2 = "<meta content=\"two\" property=\"og:url\">"
|
||||||
|
|||||||
Reference in New Issue
Block a user