Merge branch 'dm-fixes' into 'develop'

Small chats fixes

Closes #1258

See merge request soapbox-pub/soapbox!2018
This commit is contained in:
Alex Gleason 2022-12-19 00:04:32 +00:00
commit 6b5c214b9a
3 changed files with 7 additions and 7 deletions

View file

@ -526,11 +526,11 @@ const Header: React.FC<IHeader> = ({ account }) => {
}; };
const renderMessageButton = () => { const renderMessageButton = () => {
if (features.chatsWithFollowers) { // Truth Social if (!ownAccount || !account || account.id === ownAccount?.id) {
if (!ownAccount || !account || account.id === ownAccount?.id) { return null;
return null; }
}
if (features.chatsWithFollowers) { // Truth Social
const canChat = account.relationship?.followed_by; const canChat = account.relationship?.followed_by;
if (!canChat) { if (!canChat) {
return null; return null;

View file

@ -7,7 +7,7 @@ import { useOwnAccount } from 'soapbox/hooks';
import { useUpdateCredentials } from 'soapbox/queries/accounts'; import { useUpdateCredentials } from 'soapbox/queries/accounts';
const messages = defineMessages({ const messages = defineMessages({
label: { id: 'settings.messages.label', defaultMessage: 'Allow users you follow to start a new chat with you' }, label: { id: 'settings.messages.label', defaultMessage: 'Allow users to start a new chat with you' },
}); });
const MessagesSettings = () => { const MessagesSettings = () => {

View file

@ -1,5 +1,5 @@
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import { defineMessages, useIntl } from 'react-intl'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
@ -106,7 +106,7 @@ const Settings = () => {
{features.chats ? ( {features.chats ? (
<> <>
<CardHeader> <CardHeader>
<CardTitle title='Direct Messages' /> <CardTitle title={<FormattedMessage id='column.chats' defaultMessage='Chats' />} />
</CardHeader> </CardHeader>
<CardBody> <CardBody>