Chats: hide read receipts for unsupported servers

revert-fa4bd20d
Alex Gleason 2022-12-06 22:32:35 -06:00
rodzic 2986f00728
commit d4419bf71f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -348,7 +348,7 @@ const ChatMessageList: React.FC<IChatMessageList> = ({ chat }) => {
{intl.formatTime(chatMessage.created_at)}
</Text>
{isMyMessage ? (
{(isMyMessage && features.chatsReadReceipts) ? (
<>
{isRead ? (
<span className='rounded-full flex flex-col items-center justify-center p-0.5 bg-primary-500 text-white dark:bg-primary-400 dark:text-primary-900 border border-solid border-primary-500 dark:border-primary-400'>

Wyświetl plik

@ -238,6 +238,12 @@ const getInstanceFeatures = (instance: Instance) => {
*/
chatsMedia: v.software !== TRUTHSOCIAL,
/**
* Whether chat messages have read receipts.
* @see GET /api/v1/pleroma/chats/:id/messages
*/
chatsReadReceipts: v.software === TRUTHSOCIAL,
/**
* Ability to search among chats.
* @see GET /api/v1/pleroma/chats