diff --git a/lib/actions/link-actions.js b/lib/actions/link-actions.js
--- a/lib/actions/link-actions.js
+++ b/lib/actions/link-actions.js
@@ -43,6 +43,7 @@
return {
status: response.status,
community: response.community,
+ thread: response.thread,
};
}
return {
diff --git a/lib/hooks/invite-links.js b/lib/hooks/invite-links.js
--- a/lib/hooks/invite-links.js
+++ b/lib/hooks/invite-links.js
@@ -134,21 +134,27 @@
export type LinkStatus = 'invalid' | 'valid' | 'timed_out' | 'already_joined';
const inviteLinkTexts: {
- +[LinkStatus]: { +header: string, +message: string },
+ +[LinkStatus]: {
+ +header: string,
+ +message: (isThreadLink: boolean) => string,
+ },
} = {
invalid: {
header: 'Invite invalid',
- message:
+ message: () =>
'This invite link may be expired. Please try again with another invite' +
' link.',
},
['timed_out']: {
header: 'Timeout',
- message: 'The request has timed out.',
+ message: () => 'The request has timed out.',
},
['already_joined']: {
header: 'Already a member',
- message: 'You are already a member of this community.',
+ message: isThreadLink =>
+ `You are already a member of this ${
+ isThreadLink ? 'thread' : 'community'
+ }.`,
},
};
diff --git a/native/navigation/invite-link-modal.react.js b/native/navigation/invite-link-modal.react.js
--- a/native/navigation/invite-link-modal.react.js
+++ b/native/navigation/invite-link-modal.react.js
@@ -86,7 +86,7 @@
{inviteLinkTexts[linkStatus].header}