Chats: hide read receipts for unsupported servers

This commit is contained in:
Alex Gleason 2022-12-06 22:32:35 -06:00
parent 2986f00728
commit d4419bf71f
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 7 additions and 1 deletions

View file

@ -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'>

View file

@ -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