Fix issues when group isn't local
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
4d4ee80b8c
commit
acf51a3130
|
@ -5,7 +5,13 @@ import {
|
||||||
} from "@/graphql/actor";
|
} from "@/graphql/actor";
|
||||||
import { FETCH_GROUP } from "@/graphql/group";
|
import { FETCH_GROUP } from "@/graphql/group";
|
||||||
import RouteName from "@/router/name";
|
import RouteName from "@/router/name";
|
||||||
import { Group, IActor, IGroup, IPerson } from "@/types/actor";
|
import {
|
||||||
|
Group,
|
||||||
|
IActor,
|
||||||
|
IGroup,
|
||||||
|
IPerson,
|
||||||
|
usernameWithDomain,
|
||||||
|
} from "@/types/actor";
|
||||||
import { MemberRole } from "@/types/enums";
|
import { MemberRole } from "@/types/enums";
|
||||||
import { Component, Vue } from "vue-property-decorator";
|
import { Component, Vue } from "vue-property-decorator";
|
||||||
|
|
||||||
|
@ -34,7 +40,7 @@ import { Component, Vue } from "vue-property-decorator";
|
||||||
variables() {
|
variables() {
|
||||||
return {
|
return {
|
||||||
id: this.currentActor.id,
|
id: this.currentActor.id,
|
||||||
group: this.group.preferredUsername,
|
group: usernameWithDomain(this.group),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
subscribeToMore: {
|
subscribeToMore: {
|
||||||
|
|
|
@ -11,7 +11,7 @@ defmodule Mobilizon.Service.Export.Common do
|
||||||
|
|
||||||
@spec fetch_actor_event_feed(String.t()) :: String.t()
|
@spec fetch_actor_event_feed(String.t()) :: String.t()
|
||||||
def fetch_actor_event_feed(name) do
|
def fetch_actor_event_feed(name) do
|
||||||
with %Actor{} = actor <- Actors.get_local_actor_by_name(name),
|
with %Actor{} = actor <- Actors.get_actor_by_name(name),
|
||||||
{:visibility, true} <- {:visibility, Actor.is_public_visibility?(actor)},
|
{:visibility, true} <- {:visibility, Actor.is_public_visibility?(actor)},
|
||||||
%Page{elements: events} <- Events.list_public_events_for_actor(actor),
|
%Page{elements: events} <- Events.list_public_events_for_actor(actor),
|
||||||
%Page{elements: posts} <- Posts.get_public_posts_for_group(actor) do
|
%Page{elements: posts} <- Posts.get_public_posts_for_group(actor) do
|
||||||
|
|
Loading…
Reference in a new issue