Expose correct relay address in federation

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-05-06 17:21:11 +02:00
parent 3982977121
commit 888d2ef4b8
6 changed files with 15 additions and 15 deletions

View File

@@ -74,6 +74,7 @@ export const INSTANCE_FRAGMENT = gql`
fragment InstanceFragment on Instance {
domain
hasRelay
relayAddress
followerStatus
followedStatus
eventCount

View File

@@ -3,6 +3,7 @@ import { InstanceFollowStatus } from "./enums";
export interface IInstance {
domain: string;
hasRelay: boolean;
relayAddress: string | null;
followerStatus: InstanceFollowStatus;
followedStatus: InstanceFollowStatus;
personCount: number;

View File

@@ -162,7 +162,7 @@ export default class Instance extends Vue {
await this.$apollo.mutate({
mutation: ACCEPT_RELAY,
variables: {
address: `relay@${this.domain}`,
address: this.instance.relayAddress,
},
update(cache: ApolloCache<any>) {
cache.writeFragment({
@@ -194,7 +194,7 @@ export default class Instance extends Vue {
await this.$apollo.mutate({
mutation: REJECT_RELAY,
variables: {
address: `relay@${this.domain}`,
address: this.instance.relayAddress,
},
update(cache: ApolloCache<any>) {
cache.writeFragment({
@@ -242,7 +242,7 @@ export default class Instance extends Vue {
await this.$apollo.mutate({
mutation: REMOVE_RELAY,
variables: {
address: `relay@${this.domain}`,
address: this.instance.relayAddress,
},
update(cache: ApolloCache<any>) {
cache.writeFragment({