Provide temporary fix for communication with old server
Change-Id: I74c986b7d7892e4051908c9ee751f701ff4f4b9c
diff --git a/client/src/components/ConversationListItem.tsx b/client/src/components/ConversationListItem.tsx
index 9dab62e..b432a45 100644
--- a/client/src/components/ConversationListItem.tsx
+++ b/client/src/components/ConversationListItem.tsx
@@ -95,6 +95,8 @@
const [userId, setUserId] = useState(conversation?.getFirstMember()?.contact.getUri());
const [isSwarm, setIsSwarm] = useState(true);
+ const navigateUrlPrefix = `/deprecated-account/${conversation.getAccountId()}`;
+
const openMenu = (e: MouseEvent<HTMLDivElement>) => {
e.preventDefault();
console.log(e);
@@ -150,7 +152,7 @@
<Menu open={!!menuAnchorEl} onClose={closeModal} anchorEl={menuAnchorEl}>
<MenuItem
onClick={() => {
- navigate(`/account/${conversation.getAccountId()}/${uri}`);
+ navigate(`${navigateUrlPrefix}/${uri}`);
closeModal();
}}
>
@@ -163,7 +165,7 @@
</MenuItem>
<MenuItem
onClick={() => {
- navigate(`/account/${conversation.getAccountId()}/call/${conversation.getId()}`);
+ navigate(`${navigateUrlPrefix}/call/${conversation.getId()}`);
}}
>
<ListItemIcon>
@@ -176,7 +178,7 @@
<MenuItem
onClick={() => {
- navigate(`/account/${conversation.getAccountId()}/call/${conversation.getId()}?video=true`);
+ navigate(`${navigateUrlPrefix}/call/${conversation.getId()}?video=true`);
}}
>
<ListItemIcon>
@@ -190,7 +192,7 @@
{isSelected && (
<MenuItem
onClick={() => {
- navigate(`/account/${conversation.getAccountId()}/`);
+ navigate(`${navigateUrlPrefix}/`);
closeModal();
}}
>
@@ -400,7 +402,7 @@
button
alignItems="flex-start"
selected={isSelected}
- onClick={() => navigate(`/account/${conversation.getAccountId()}/${uri}`)}
+ onClick={() => navigate(`${navigateUrlPrefix}/${uri}`)}
>
<ListItemAvatar>
<ConversationAvatar displayName={conversation.getDisplayNameNoFallback()} />
diff --git a/client/src/components/ConversationView.tsx b/client/src/components/ConversationView.tsx
index d4b8f90..a269c89 100644
--- a/client/src/components/ConversationView.tsx
+++ b/client/src/components/ConversationView.tsx
@@ -165,7 +165,7 @@
}, [account, members, adminTitle, t]);
const startCall = (withVideo = false) => {
- let url = `/account/${account.getId()}/call/${conversationId}`;
+ let url = `/deprecated-account/${account.getId()}/call/${conversationId}`;
if (withVideo) {
url += '?video=true';
}
diff --git a/client/src/components/ConversationsOverviewCard.jsx b/client/src/components/ConversationsOverviewCard.jsx
index 6bb9dce..d233df0 100644
--- a/client/src/components/ConversationsOverviewCard.jsx
+++ b/client/src/components/ConversationsOverviewCard.jsx
@@ -45,7 +45,7 @@
}, [accountId]);
return (
- <Card onClick={() => navigate(`/account/${accountId}`)}>
+ <Card onClick={() => navigate(`/deprecated-account/${accountId}`)}>
<CardActionArea>
<CardContent>
<Typography color="textSecondary" gutterBottom>
diff --git a/client/src/components/Header.tsx b/client/src/components/Header.tsx
index f2a0c37..2a00e7f 100644
--- a/client/src/components/Header.tsx
+++ b/client/src/components/Header.tsx
@@ -29,7 +29,7 @@
const params = useParams();
const goToContacts = () => navigate(`/contacts`);
- const goToAccountSettings = () => navigate(`/account/${params.accountId}/settings`);
+ const goToAccountSettings = () => navigate(`/deprecated-account/${params.accountId}/settings`);
const logout = () => {
setAccessToken('');
diff --git a/client/src/components/Message.tsx b/client/src/components/Message.tsx
index 152f455..6b2fad8 100644
--- a/client/src/components/Message.tsx
+++ b/client/src/components/Message.tsx
@@ -28,11 +28,12 @@
Typography,
} from '@mui/material';
import { styled } from '@mui/material/styles';
-import dayjs, { Dayjs } from 'dayjs';
+import { Dayjs } from 'dayjs';
import { Account, Contact, Message } from 'jami-web-common';
import { ReactElement, ReactNode, useCallback, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
+import dayjs from '../dayjsInitializer';
import { EmojiButton, MoreButton, ReplyMessageButton } from './Button';
import ConversationAvatar from './ConversationAvatar';
import {