Merge branch 'koena-connect' into 'master'

Add Koena Connect button

See merge request framasoft/mobilizon!926
This commit is contained in:
Thomas Citharel 2021-05-19 08:09:13 +00:00
commit 5d1f64ce9b
35 changed files with 896 additions and 955 deletions

View File

@ -78,14 +78,14 @@
"@types/vuedraggable": "^2.23.0",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"@vue/cli-plugin-babel": "~4.5.12",
"@vue/cli-plugin-e2e-cypress": "~4.5.12",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-pwa": "~4.5.12",
"@vue/cli-plugin-router": "~4.5.12",
"@vue/cli-plugin-typescript": "~4.5.12",
"@vue/cli-plugin-unit-jest": "~4.5.12",
"@vue/cli-service": "~4.5.12",
"@vue/cli-plugin-babel": "~4.5.13",
"@vue/cli-plugin-e2e-cypress": "~4.5.13",
"@vue/cli-plugin-eslint": "~4.5.13",
"@vue/cli-plugin-pwa": "~4.5.13",
"@vue/cli-plugin-router": "~4.5.13",
"@vue/cli-plugin-typescript": "~4.5.13",
"@vue/cli-plugin-unit-jest": "~4.5.13",
"@vue/cli-service": "~4.5.13",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-typescript": "^7.0.0",
"@vue/test-utils": "^1.1.0",

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -60,7 +60,8 @@ const CustomImage = Image.extend({
top: realEvent.clientY,
});
if (!coordinates) return false;
const client = apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
const client =
apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
try {
images.forEach(async (image) => {

View File

@ -8,7 +8,8 @@ import apolloProvider from "@/vue-apollo";
import { IPerson } from "@/types/actor";
import pDebounce from "p-debounce";
const client = apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
const client =
apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
const fetchItems = async (query: string): Promise<IPerson[]> => {
const result = await client.query({

View File

@ -17,16 +17,32 @@
<b-navbar-item tag="router-link" :to="{ name: RouteName.SEARCH }">{{
$t("Explore")
}}</b-navbar-item>
<b-navbar-item tag="router-link" :to="{ name: RouteName.MY_EVENTS }">{{
$t("My events")
}}</b-navbar-item>
<b-navbar-item
v-if="currentActor.id && currentUser.isLoggedIn"
tag="router-link"
:to="{ name: RouteName.MY_EVENTS }"
>{{ $t("My events") }}</b-navbar-item
>
<b-navbar-item
tag="router-link"
:to="{ name: RouteName.MY_GROUPS }"
v-if="config && config.features.groups"
v-if="
config &&
config.features.groups &&
currentActor.id &&
currentUser.isLoggedIn
"
>{{ $t("My groups") }}</b-navbar-item
>
<b-navbar-item tag="span" v-if="config && config.features.eventCreation">
<b-navbar-item
tag="span"
v-if="
config &&
config.features.eventCreation &&
currentActor.id &&
currentUser.isLoggedIn
"
>
<b-button
tag="router-link"
:to="{ name: RouteName.CREATE_EVENT }"
@ -34,6 +50,19 @@
>{{ $t("Create") }}</b-button
>
</b-navbar-item>
<b-navbar-item
v-if="config && config.features.koenaConnect"
class="koena"
tag="a"
href="https://mediation.koena.net/framasoft/mobilizon/"
target="_blank"
>
<img
src="/img/koena-a11y.svg"
width="150"
alt="Contact accessibilité"
/>
</b-navbar-item>
</template>
<template slot="end">
<b-navbar-item tag="div">
@ -303,5 +332,14 @@ nav {
a.navbar-item:focus-within {
background-color: inherit;
}
.koena {
padding-top: 0;
padding-bottom: 0;
& > img {
max-height: 4rem;
padding-top: 0.2rem;
}
}
}
</style>

View File

@ -67,6 +67,7 @@ export const CONFIG = gql`
features {
groups
eventCreation
koenaConnect
}
auth {
ldap

View File

@ -14,9 +14,8 @@ export default class IdentityEditionMixin extends Mixins(Vue) {
);
if (this.identity.preferredUsername === oldUsername) {
this.identity.preferredUsername = IdentityEditionMixin.convertToUsername(
newDisplayName
);
this.identity.preferredUsername =
IdentityEditionMixin.convertToUsername(newDisplayName);
}
this.oldDisplayName = newDisplayName;

View File

@ -82,6 +82,7 @@ export interface IConfig {
features: {
eventCreation: boolean;
groups: boolean;
koenaConnect: boolean;
};
federating: boolean;
version: string;

View File

@ -344,14 +344,16 @@ export default class AdminGroupProfile extends Vue {
}
confirmSuspendProfile(): void {
const message = (this.group.domain
const message = (
this.group.domain
? this.$t(
"Are you sure you want to <b>suspend</b> this group? As this group originates from instance {instance}, this will only remove local members and delete the local data, as well as rejecting all the future data.",
{ instance: this.group.domain }
)
: this.$t(
"Are you sure you want to <b>suspend</b> this group? All members - including remote ones - will be notified and removed from the group, and <b>all of the group data (events, posts, discussions, todos…) will be irretrievably destroyed</b>."
)) as string;
)
) as string;
this.$buefy.dialog.confirm({
title: this.$t("Suspend group") as string,

View File

@ -774,9 +774,11 @@ export default class EditEvent extends Vue {
get updateEventMessage(): string {
if (this.unmodifiedEvent.draft && !this.event.draft)
return this.$i18n.t("The event has been updated and published") as string;
return (this.event.draft
return (
this.event.draft
? this.$i18n.t("The draft event has been updated")
: this.$i18n.t("The event has been updated")) as string;
: this.$i18n.t("The event has been updated")
) as string;
}
private handleError(err: any) {

View File

@ -874,7 +874,8 @@ export default class Event extends EventMixin {
try {
if (window.isSecureContext) {
this.anonymousParticipation = await this.anonymousParticipationConfirmed();
this.anonymousParticipation =
await this.anonymousParticipationConfirmed();
}
} catch (e) {
if (e instanceof AnonymousParticipationNotFoundError) {

View File

@ -545,6 +545,7 @@ import { IMember } from "@/types/actor/member.model";
import RouteName from "../../router/name";
import GroupSection from "../../components/Group/GroupSection.vue";
import ReportModal from "../../components/Report/ReportModal.vue";
import { PERSON_MEMBERSHIP_GROUP } from "@/graphql/actor";
@Component({
apollo: {
@ -604,11 +605,24 @@ export default class Group extends mixins(GroupMixin) {
}
async joinGroup(): Promise<void> {
const [group, currentActorId] = [
usernameWithDomain(this.group),
this.currentActor.id,
];
this.$apollo.mutate({
mutation: JOIN_GROUP,
variables: {
groupId: this.group.id,
},
refetchQueries: [
{
query: PERSON_MEMBERSHIP_GROUP,
variables: {
id: currentActorId,
group,
},
},
],
});
}

View File

@ -562,7 +562,8 @@ export default class Resources extends Mixins(ResourceMixin) {
const updatedResource: IResource = data.updateResource;
// eslint-disable-next-line vue/max-len
oldParentCachedResource.children.elements = oldParentCachedResource.children.elements.filter(
oldParentCachedResource.children.elements =
oldParentCachedResource.children.elements.filter(
(cachedResource) => cachedResource.id !== updatedResource.id
);

View File

@ -155,7 +155,10 @@
<div class="container">
<div class="columns">
<div
class="column is-one-third-desktop is-offset-one-third-desktop"
class="
column
is-one-third-desktop is-offset-one-third-desktop
"
>
<h1 class="title">
{{ $t("Deleting your Mobilizon account") }}

View File

@ -251,8 +251,10 @@ export default class Notifications extends Vue {
if (this.loggedUser && this.loggedUser.settings) {
this.notificationOnDay = this.loggedUser.settings.notificationOnDay;
this.notificationEachWeek = this.loggedUser.settings.notificationEachWeek;
this.notificationBeforeEvent = this.loggedUser.settings.notificationBeforeEvent;
this.notificationPendingParticipation = this.loggedUser.settings.notificationPendingParticipation;
this.notificationBeforeEvent =
this.loggedUser.settings.notificationBeforeEvent;
this.notificationPendingParticipation =
this.loggedUser.settings.notificationPendingParticipation;
}
}

View File

@ -106,10 +106,8 @@ const decreaseFetches = () => {
Cypress.env("fetchCount", count - 1);
};
const buildTrackableFetchWithSessionId = (fetch) => (
fetchUrl,
fetchOptions
) => {
const buildTrackableFetchWithSessionId =
(fetch) => (fetchUrl, fetchOptions) => {
const { headers } = fetchOptions;
const modifiedHeaders = {
"x-session-id": Cypress.env("sessionId"),

View File

@ -54,6 +54,7 @@ export const configMock = {
__typename: "Features",
eventCreation: true,
groups: true,
koenaConnect: false,
},
geocoding: {
__typename: "Geocoding",

View File

@ -74,8 +74,7 @@ export const eventCommentThreadsMock = {
__typename: "Comment",
id: "2",
uuid: "e37910ea-fd5a-4756-9679-00971f3f4107",
url:
"https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-00971f3f4107",
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-00971f3f4107",
text: "my comment text",
local: true,
visibility: "PUBLIC",
@ -100,8 +99,7 @@ export const eventCommentThreadsMock = {
__typename: "Comment",
id: "29",
uuid: "e37910ea-fd5a-4756-9679-01171f3f4107",
url:
"https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4107",
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4107",
text: "a second comment",
local: true,
visibility: "PUBLIC",
@ -139,8 +137,7 @@ export const newCommentForEventResponse: DataMock = {
__typename: "Comment",
id: "79",
uuid: "e37910ea-fd5a-4756-9679-01171f3f4444",
url:
"https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4444",
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4444",
text: newCommentForEventMock.text,
local: true,
visibility: "PUBLIC",

File diff suppressed because it is too large Load Diff

View File

@ -126,7 +126,8 @@ defmodule Mobilizon.GraphQL.Resolvers.Config do
timezones: Tzdata.zone_list(),
features: %{
groups: Config.instance_group_feature_enabled?(),
event_creation: Config.instance_event_creation_enabled?()
event_creation: Config.instance_event_creation_enabled?(),
koena_connect: Config.get([:instance, :koena_connect_link], false)
},
rules: Config.instance_rules(),
version: Config.instance_version(),

View File

@ -268,6 +268,8 @@ defmodule Mobilizon.GraphQL.Schema.ConfigType do
field(:event_creation, :boolean,
description: "Whether event creation is allowed on this instance"
)
field(:koena_connect, :boolean, description: "Activate link to Koena Connect")
end
@desc """

View File

@ -58,7 +58,7 @@ defmodule Mobilizon.Web.MediaProxy do
end
defp signed_url(url) do
:crypto.hmac(:sha, Config.get([Web.Endpoint, :secret_key_base]), url)
:crypto.mac(:hmac, :sha, Config.get([Web.Endpoint, :secret_key_base]), url)
end
def filename(url_or_path) do

View File

@ -15,9 +15,9 @@
"comeonin": {:hex, :comeonin, "5.3.2", "5c2f893d05c56ae3f5e24c1b983c2d5dfb88c6d979c9287a76a7feb1e1d8d646", [:mix], [], "hexpm", "d0993402844c49539aeadb3fe46a3c9bd190f1ecf86b6f9ebd71957534c95f04"},
"connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"},
"cors_plug": {:hex, :cors_plug, "2.0.3", "316f806d10316e6d10f09473f19052d20ba0a0ce2a1d910ddf57d663dac402ae", [:mix], [{:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ee4ae1418e6ce117fc42c2ba3e6cbdca4e95ecd2fe59a05ec6884ca16d469aea"},
"cowboy": {:hex, :cowboy, "2.8.0", "f3dc62e35797ecd9ac1b50db74611193c29815401e53bac9a5c0577bd7bc667d", [:rebar3], [{:cowlib, "~> 2.9.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a"},
"cowboy": {:hex, :cowboy, "2.9.0", "865dd8b6607e14cf03282e10e934023a1bd8be6f6bacf921a7e2a96d800cd452", [:make, :rebar3], [{:cowlib, "2.11.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "2c729f934b4e1aa149aff882f57c6372c15399a20d54f65c8d67bef583021bde"},
"cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"},
"cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"},
"cowlib": {:hex, :cowlib, "2.11.0", "0b9ff9c346629256c42ebe1eeb769a83c6cb771a6ee5960bd110ab0b9b872063", [:make, :rebar3], [], "hexpm", "2b3e9da0b21c4565751a6d4901c20d1b4cc25cbb7fd50d91d2ab6dd287bc86a9"},
"credo": {:hex, :credo, "1.5.5", "e8f422026f553bc3bebb81c8e8bf1932f498ca03339856c7fec63d3faac8424b", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dd8623ab7091956a855dc9f3062486add9c52d310dfd62748779c4315d8247de"},
"dataloader": {:hex, :dataloader, "1.0.8", "114294362db98a613f231589246aa5b0ce847412e8e75c4c94f31f204d272cbf", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "eaf3c2aa2bc9dbd2f1e960561d616b7f593396c4754185b75904f6d66c82a667"},
"db_connection": {:hex, :db_connection, "2.4.0", "d04b1b73795dae60cead94189f1b8a51cc9e1f911c234cc23074017c43c031e5", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ad416c21ad9f61b3103d254a71b63696ecadb6a917b36f563921e0de00d7d7c8"},
@ -35,12 +35,12 @@
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"erlsom": {:hex, :erlsom, "1.5.0", "c5a5cdd0ee0e8dca62bcc4b13ff08da24fdefc16ccd8b25282a2fda2ba1be24a", [:rebar3], [], "hexpm", "55a9dbf9cfa77fcfc108bd8e2c4f9f784dea228a8f4b06ea10b684944946955a"},
"eternal": {:hex, :eternal, "1.2.2", "d1641c86368de99375b98d183042dd6c2b234262b8d08dfd72b9eeaafc2a1abd", [:mix], [], "hexpm", "2c9fe32b9c3726703ba5e1d43a1d255a4f3f2d8f8f9bc19f094c7cb1a7a9e782"},
"ex_cldr": {:hex, :ex_cldr, "2.20.0", "571a4b490c333809be59cc984a21be2deaab1db9e2418e323d5935aec8b1394a", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.15", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.13", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "06147e4a27be62e6fe92db14cf5048c645927bfc530aa1cc6af8c92d65e32427"},
"ex_cldr_calendars": {:hex, :ex_cldr_calendars, "1.14.0", "e1d1a6a0e9d594bc0da4f2881c9b0fac822075f5e2bfdba3ef5edf1a0a66abac", [:mix], [{:calendar_interval, "~> 0.2", [hex: :calendar_interval, repo: "hexpm", optional: true]}, {:earmark, "~> 1.0", [hex: :earmark, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.17", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_cldr_units, "~> 3.5", [hex: :ex_cldr_units, repo: "hexpm", optional: true]}, {:ex_doc, "~> 0.21", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "6f95e8350b00aedb26610fd461803993efe737bc535bfbf8cce4c7f66944648c"},
"ex_cldr": {:hex, :ex_cldr, "2.21.0", "27144a6649df3a315de85da5b9ad2db1b9e2a754d0c6ea498653b859b6340e04", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.15", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.13", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "4b3d8df8ada72f0d82e867fea7c88de9904c19dc69e5797684757ad64e907df7"},
"ex_cldr_calendars": {:hex, :ex_cldr_calendars, "1.14.1", "50b4d2b1105780743647bbcede5109c9efcf57c525cb773ba9467bea817df379", [:mix], [{:calendar_interval, "~> 0.2", [hex: :calendar_interval, repo: "hexpm", optional: true]}, {:earmark, "~> 1.0", [hex: :earmark, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.17", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_cldr_units, "~> 3.5", [hex: :ex_cldr_units, repo: "hexpm", optional: true]}, {:ex_doc, "~> 0.21", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "ffd960e96a1d67d565a59c5d02c16506c4a3df6c70673d8d48087d6b11bca0a3"},
"ex_cldr_currencies": {:hex, :ex_cldr_currencies, "2.9.1", "692d9d8262bd9c423d601d5ce6ae294df85f8652664e723e2cfd68d97bd72a10", [:mix], [{:ex_cldr, "~> 2.20", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "1bc6f9eabef1e79e98cb9f8b14dc5657c17ddcbea31e800440fd52a6e45e20ac"},
"ex_cldr_dates_times": {:hex, :ex_cldr_dates_times, "2.7.0", "c8fc77e075e7408fd414b2a4396e2023901032a3c20d94035b8cee54a10f28c9", [:mix], [{:calendar_interval, "~> 0.2", [hex: :calendar_interval, repo: "hexpm", optional: true]}, {:ex_cldr_calendars, "~> 1.13", [hex: :ex_cldr_calendars, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.17", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "e21e8c6f9440c91d6111cb39ac96a423d833206ce8d1b24bbdeddd12b2b9427d"},
"ex_cldr_dates_times": {:hex, :ex_cldr_dates_times, "2.7.2", "04aea75ccc017e006961f9c6413aa203630ec2a3bb03091b5943d0013ff21b61", [:mix], [{:calendar_interval, "~> 0.2", [hex: :calendar_interval, repo: "hexpm", optional: true]}, {:ex_cldr_calendars, "~> 1.13", [hex: :ex_cldr_calendars, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.17", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "ae6bcb69d5e6585b10265eb984d60894e82ff5b91c0ac61ea7d35278a11e9aa0"},
"ex_cldr_languages": {:hex, :ex_cldr_languages, "0.2.2", "d7dab93272443b70e18e6aef0f62974418baaca3a3b31a66d51921ec1547113c", [:mix], [{:ex_cldr, "~> 2.2 and >= 2.2.1", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "d9cbf4bf643365b0042e774520ddfcbc31618efd5a5383fac98f75149961622c"},
"ex_cldr_numbers": {:hex, :ex_cldr_numbers, "2.17.0", "e79d4161ca82ce8d40bec5bb7dc83d457e81d03e39042e5b62ff48b2cc3c35f3", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ex_cldr, "~> 2.20", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_currencies, "~> 2.9", [hex: :ex_cldr_currencies, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "c6b7ee62e97cefc6d3c47896608f8152cc65ea40238ea99cd92c6f04acdd1627"},
"ex_cldr_numbers": {:hex, :ex_cldr_numbers, "2.18.0", "58ff26aa7420e6bc3d0e0902c031b409b30cbc924e31efa1df0988f865c7756c", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ex_cldr, "~> 2.21", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:ex_cldr_currencies, "~> 2.9", [hex: :ex_cldr_currencies, repo: "hexpm", optional: false]}, {:ex_doc, "~> 0.18", [hex: :ex_doc, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "9663db9c6a3d2bae4d6cf9847aad7f00c48c87a3336629b34d72f70ad753f7cb"},
"ex_crypto": {:hex, :ex_crypto, "0.10.0", "af600a89b784b36613a989da6e998c1b200ff1214c3cfbaf8deca4aa2f0a1739", [:mix], [{:poison, ">= 2.0.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm", "ccc7472cfe8a0f4565f97dce7e9280119bf15a5ea51c6535e5b65f00660cde1c"},
"ex_doc": {:hex, :ex_doc, "0.24.2", "e4c26603830c1a2286dae45f4412a4d1980e1e89dc779fcd0181ed1d5a05c8d9", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "e134e1d9e821b8d9e4244687fb2ace58d479b67b282de5158333b0d57c6fb7da"},
"ex_ical": {:hex, :ex_ical, "0.2.0", "4b928b554614704016cc0c9ee226eb854da9327a1cc460457621ceacb1ac29a6", [:mix], [{:timex, "~> 3.1", [hex: :timex, repo: "hexpm", optional: false]}], "hexpm", "db76473b2ae0259e6633c6c479a5a4d8603f09497f55c88f9ef4d53d2b75befb"},
@ -102,7 +102,7 @@
"oauther": {:hex, :oauther, "1.1.1", "7d8b16167bb587ecbcddd3f8792beb9ec3e7b65c1f8ebd86b8dd25318d535752", [:mix], [], "hexpm", "9374f4302045321874cccdc57eb975893643bd69c3b22bf1312dab5f06e5788e"},
"oban": {:hex, :oban, "2.6.1", "7466e25934be6c3f696c624ed0779459dd2add03d19f9865a478d3b47b77e814", [:mix], [{:ecto_sql, ">= 3.4.3", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.14", [hex: :postgrex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3e86eaab8fdd1c1af64f7cfd46ad4352d19696709eb2068de239e40894a254ea"},
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
"phoenix": {:hex, :phoenix, "1.5.8", "71cfa7a9bb9a37af4df98939790642f210e35f696b935ca6d9d9c55a884621a4", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "35ded0a32f4836168c7ab6c33b88822eccd201bcd9492125a9bea4c54332d955"},
"phoenix": {:hex, :phoenix, "1.5.9", "a6368d36cfd59d917b37c44386e01315bc89f7609a10a45a22f47c007edf2597", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7e4bce20a67c012f1fbb0af90e5da49fa7bf0d34e3a067795703b74aef75427d"},
"phoenix_ecto": {:hex, :phoenix_ecto, "4.2.1", "13f124cf0a3ce0f1948cf24654c7b9f2347169ff75c1123f44674afee6af3b03", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 2.15", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "478a1bae899cac0a6e02be1deec7e2944b7754c04e7d4107fc5a517f877743c0"},
"phoenix_html": {:hex, :phoenix_html, "2.14.3", "51f720d0d543e4e157ff06b65de38e13303d5778a7919bcc696599e5934271b8", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "efd697a7fff35a13eeeb6b43db884705cba353a1a41d127d118fda5f90c8e80f"},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.3.1", "9eba6ad16bd80c45f338b2059c7b255ce30784d76f4181304e7b78640e5a7513", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "f3ae26b5abb85a1cb2bc8bb199e29fbcefb34259e469b31fe0c6323f2175a5ef"},
@ -113,7 +113,7 @@
"poison": {:hex, :poison, "4.0.1", "bcb755a16fac91cad79bfe9fc3585bb07b9331e50cfe3420a24bcc2d735709ae", [:mix], [], "hexpm", "ba8836feea4b394bb718a161fc59a288fe0109b5006d6bdf97b6badfcf6f0f25"},
"postgrex": {:hex, :postgrex, "0.15.9", "46f8fe6f25711aeb861c4d0ae09780facfdf3adbd2fb5594ead61504dd489bda", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "610719103e4cb2223d4ab78f9f0f3e720320eeca6011415ab4137ddef730adee"},
"progress_bar": {:hex, :progress_bar, "2.0.1", "7b40200112ae533d5adceb80ff75fbe66dc753bca5f6c55c073bfc122d71896d", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "2519eb58a2f149a3a094e729378256d8cb6d96a259ec94841bd69fdc71f18f87"},
"ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"},
"ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"},
"remote_ip": {:hex, :remote_ip, "1.0.0", "3d7fb45204a5704443f480cee9515e464997f52c35e0a60b6ece1f81484067ae", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "9e9fcad4e50c43b5234bb6a9629ed6ab223f3ed07147bd35470e4ee5c8caf907"},
"rsa_ex": {:hex, :rsa_ex, "0.4.0", "e28dd7dc5236e156df434af0e4aa822384c8866c928e17b785d4edb7c253b558", [:mix], [], "hexpm", "40e1f08e8401da4be59a6dd0f4da30c42d5bb01703161f0208d839d97db27f4e"},
"sentry": {:hex, :sentry, "8.0.5", "5ca922b9238a50c7258b52f47364b2d545beda5e436c7a43965b34577f1ef61f", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "4972839fdbf52e886d7b3e694c8adf421f764f2fa79036b88fb4742049bd4b7c"},

View File

@ -61,8 +61,8 @@ defmodule Mobilizon.Federation.ActivityPubTest do
end
test "object reply by url" do
url = "https://zoltasila.pl/objects/1c295713-8e3c-411e-9e62-57a7b9c9e514"
reply_to_url = "https://framapiaf.org/users/peertube/statuses/104584600044284729"
url = "https://pirateradio.social/notice/A5XnLBsFNQDKtthzM0"
reply_to_url = "https://framapiaf.org/users/peertube/statuses/105945857653893100"
data =
File.read!("test/fixtures/mastodon-status-3.json")

View File

@ -40,7 +40,7 @@ defmodule Mobilizon.Federation.ActivityPub.Transmogrifier.CommentsTest do
File.read!("test/fixtures/mastodon-post-activity.json")
|> Jason.decode!()
reply_to_url = "https://blob.cat/objects/02fdea3d-932c-4348-9ecb-3f9eb3fbdd94"
reply_to_url = "https://soc.punktrash.club/objects/d811df79-6e54-4f51-841e-0c38bc356467"
object =
data["object"]
@ -65,11 +65,11 @@ defmodule Mobilizon.Federation.ActivityPub.Transmogrifier.CommentsTest do
%Comment{} =
origin_comment =
Discussions.get_comment_from_url(
"https://blob.cat/objects/02fdea3d-932c-4348-9ecb-3f9eb3fbdd94"
"https://soc.punktrash.club/objects/d811df79-6e54-4f51-841e-0c38bc356467"
)
assert returned_activity.data["object"]["inReplyTo"] ==
"https://blob.cat/objects/02fdea3d-932c-4348-9ecb-3f9eb3fbdd94"
"https://soc.punktrash.club/objects/d811df79-6e54-4f51-841e-0c38bc356467"
assert returned_activity.data["object"]["inReplyTo"] == origin_comment.url
end

View File

@ -1,23 +1,24 @@
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://zoltasila.pl/schemas/litepub-0.1.jsonld",
"https://pirateradio.social/schemas/litepub-0.1.jsonld",
{
"@language": "und"
}
],
"actor": "https://zoltasila.pl/users/mkljczk",
"actor": "https://pirateradio.social/users/captain",
"attachment": [],
"attributedTo": "https://zoltasila.pl/users/mkljczk",
"cc": ["https://zoltasila.pl/users/mkljczk/followers"],
"content": "<p><span class=\"h-card\"><a class=\"u-url mention\" data-user=\"9xUDK5nC4I2pNtyIsq\" href=\"https://framapiaf.org/@peertube\" rel=\"ugc\">@<span>peertube</span></a></span> guess you wanted to put the <a href=\"https://joinpeertube.org/en_US/news#release-2-3-0\">en_US lang link</a></p>",
"context": "tag:framapiaf.org,2020-07-27:objectId=39135637:objectType=Conversation",
"conversation": "tag:framapiaf.org,2020-07-27:objectId=39135637:objectType=Conversation",
"id": "https://zoltasila.pl/objects/1c295713-8e3c-411e-9e62-57a7b9c9e514",
"inReplyTo": "https://framapiaf.org/users/peertube/statuses/104584600044284729",
"published": "2020-07-27T09:37:57.202806Z",
"attributedTo": "https://pirateradio.social/users/captain",
"cc": ["https://pirateradio.social/users/captain/followers"],
"content": "<p><span class=\"h-card\"><a class=\"u-url mention\" data-user=\"A56TgeKXmVurb7Znoe\" href=\"https://framapiaf.org/@peertube\" rel=\"ugc\">@<span>peertube</span></a></span> <a href=\"https://tv.pirateradio.social/about/instance\">Pirate Radio TV</a> is updated. You can now remote follow channels on PeerTube, awesome!</p>",
"context": "tag:framapiaf.org,2021-03-24:objectId=47491096:objectType=Conversation",
"conversation": "tag:framapiaf.org,2021-03-24:objectId=47491096:objectType=Conversation",
"id": "https://pirateradio.social/objects/eeaa8ced-27d6-49bb-a53b-fd2646b63f99",
"inReplyTo": "https://framapiaf.org/users/peertube/statuses/105945857653893100",
"published": "2021-03-24T19:01:37.759478Z",
"repliesCount": 1,
"sensitive": false,
"source": "@peertube@framapiaf.org guess you wanted to put the [en_US lang link](https://joinpeertube.org/en_US/news#release-2-3-0)",
"source": "@peertube@framapiaf.org [Pirate Radio TV](https://tv.pirateradio.social/about/instance) is updated. You can now remote follow channels on PeerTube, awesome!",
"summary": "",
"tag": [
{

View File

@ -16,40 +16,40 @@
}
}
],
"id": "https://framapiaf.org/users/peertube/statuses/104584600044284729",
"id": "https://framapiaf.org/users/peertube/statuses/105945857653893100",
"type": "Note",
"summary": null,
"inReplyTo": null,
"published": "2020-07-27T07:19:11Z",
"url": "https://framapiaf.org/@peertube/104584600044284729",
"published": "2021-03-24T17:04:54Z",
"url": "https://framapiaf.org/@peertube/105945857653893100",
"attributedTo": "https://framapiaf.org/users/peertube",
"to": ["https://www.w3.org/ns/activitystreams#Public"],
"cc": ["https://framapiaf.org/users/peertube/followers"],
"sensitive": false,
"atomUri": "https://framapiaf.org/users/peertube/statuses/104584600044284729",
"atomUri": "https://framapiaf.org/users/peertube/statuses/105945857653893100",
"inReplyToAtomUri": null,
"conversation": "tag:framapiaf.org,2020-07-27:objectId=39135637:objectType=Conversation",
"content": "<p>PeerTube 2.3 is out! Discover on <a href=\"https://joinpeertube.org/fr_FR/news#release-2-3-0\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">joinpeertube.org/fr_FR/news#re</span><span class=\"invisible\">lease-2-3-0</span></a> the list of new features! </p><p>Have you seen the broadcast message system ? 🤩</p>",
"conversation": "tag:framapiaf.org,2021-03-24:objectId=47491096:objectType=Conversation",
"content": "<p>PeerTube v3.1 is out! <br />Better transcoding features, more pleasant interfaces, possibility to easily subscribe to a remote account and... so many great features!</p><p>➡️ <a href=\"https://joinpeertube.org/en_US/news#release-3.1\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">joinpeertube.org/en_US/news#re</span><span class=\"invisible\">lease-3.1</span></a></p>",
"contentMap": {
"en": "<p>PeerTube 2.3 is out! Discover on <a href=\"https://joinpeertube.org/fr_FR/news#release-2-3-0\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">joinpeertube.org/fr_FR/news#re</span><span class=\"invisible\">lease-2-3-0</span></a> the list of new features! </p><p>Have you seen the broadcast message system ? 🤩</p>"
"en": "<p>PeerTube v3.1 is out! <br />Better transcoding features, more pleasant interfaces, possibility to easily subscribe to a remote account and... so many great features!</p><p>➡️ <a href=\"https://joinpeertube.org/en_US/news#release-3.1\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">joinpeertube.org/en_US/news#re</span><span class=\"invisible\">lease-3.1</span></a></p>"
},
"attachment": [
{
"type": "Document",
"mediaType": "image/png",
"url": "https://framapiaf.s3.framasoft.org/framapiaf/media_attachments/files/104/584/599/807/860/387/original/88c94143f78fdfa3.png",
"url": "https://framapiaf.s3.framasoft.org/framapiaf/media_attachments/files/105/945/857/331/391/923/original/7932c6912fe1e5ac.png",
"name": null,
"blurhash": "U5SY?Z00nOxu7ORP.8-pU^kVS#NGXyxbMxM{"
"blurhash": "UdMHJg00D%9F-pozjFoL?aWBe.of%Mofaeof"
}
],
"tag": [],
"replies": {
"id": "https://framapiaf.org/users/peertube/statuses/104584600044284729/replies",
"id": "https://framapiaf.org/users/peertube/statuses/105945857653893100/replies",
"type": "Collection",
"first": {
"type": "CollectionPage",
"next": "https://framapiaf.org/users/peertube/statuses/104584600044284729/replies?only_other_accounts=true&page=true",
"partOf": "https://framapiaf.org/users/peertube/statuses/104584600044284729/replies",
"next": "https://framapiaf.org/users/peertube/statuses/105945857653893100/replies?only_other_accounts=true&page=true",
"partOf": "https://framapiaf.org/users/peertube/statuses/105945857653893100/replies",
"items": []
}
}

View File

@ -1,28 +1,23 @@
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://blob.cat/schemas/litepub-0.1.jsonld",
"https://soc.punktrash.club/schemas/litepub-0.1.jsonld",
{
"@language": "und"
}
],
"actor": "https://blob.cat/users/comicbot",
"attachment": [
{
"mediaType": "image/gif",
"name": "1574936800141.gif",
"type": "Document",
"url": "https://blob.cat/media/143ba9b1ed15e67d7401906f7b71a459b90680af7075af5b8ac9cb8e3b86868a.gif"
}
],
"attributedTo": "https://blob.cat/users/comicbot",
"cc": ["https://blob.cat/users/comicbot/followers"],
"content": "Super Mega Comics <br> <a href=\"http://supermegacomics.com/\" rel=\"ugc\">http://supermegacomics.com/</a>",
"context": "https://blob.cat/contexts/26f3271a-3eb8-4f3f-8fb1-8ff96e2c4a47",
"conversation": "https://blob.cat/contexts/26f3271a-3eb8-4f3f-8fb1-8ff96e2c4a47",
"id": "https://blob.cat/objects/02fdea3d-932c-4348-9ecb-3f9eb3fbdd94",
"published": "2019-11-28T10:26:42.503473Z",
"actor": "https://soc.punktrash.club/users/jorin",
"attachment": [],
"attributedTo": "https://soc.punktrash.club/users/jorin",
"cc": ["https://soc.punktrash.club/users/jorin/followers"],
"content": "I live in Spain<br><br>The S is silent<br><br>And it&#39;s French<br><br>🥖😎",
"context": "https://soc.punktrash.club/contexts/62eb8f27-c8ea-4cc3-818d-385ff96e4397",
"conversation": "https://soc.punktrash.club/contexts/62eb8f27-c8ea-4cc3-818d-385ff96e4397",
"id": "https://soc.punktrash.club/objects/d811df79-6e54-4f51-841e-0c38bc356467",
"published": "2021-05-06T03:52:10.195835Z",
"repliesCount": 1,
"sensitive": false,
"source": "I live in Spain\n\nThe S is silent\n\nAnd it's French\n\n🥖😎",
"summary": "",
"tag": [],
"to": ["https://www.w3.org/ns/activitystreams#Public"],