|  |  | @ -12,6 +12,7 @@ import { Image } from '../../../ts/components/conversation/Image'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import useKey from 'react-use/lib/useKey'; |  |  |  | import useKey from 'react-use/lib/useKey'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { getAbsoluteAttachmentPath } from '../../types/MessageAttachment'; |  |  |  | import { getAbsoluteAttachmentPath } from '../../types/MessageAttachment'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { GoogleChrome } from '../../util'; |  |  |  | import { GoogleChrome } from '../../util'; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import { findAndFormatContact } from '../../models/message'; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | const QuotedMessageComposition = styled(Flex)` |  |  |  | const QuotedMessageComposition = styled(Flex)` | 
			
		
	
		
		
			
				
					
					|  |  |  |   border-top: 1px solid var(--border-color); |  |  |  |   border-top: 1px solid var(--border-color); | 
			
		
	
	
		
		
			
				
					|  |  | @ -47,12 +48,24 @@ const StyledText = styled(Flex)` | 
			
		
	
		
		
			
				
					
					|  |  |  | `;
 |  |  |  | `;
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | export const SessionQuotedMessageComposition = () => { |  |  |  | export const SessionQuotedMessageComposition = () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   const quotedMessageProps = useSelector(getQuotedMessage); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   const dispatch = useDispatch(); |  |  |  |   const dispatch = useDispatch(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   const quotedMessageProps = useSelector(getQuotedMessage); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   const { author, attachments, text: quoteText } = quotedMessageProps || {}; |  |  |  |   const { author, attachments, text: quoteText } = quotedMessageProps || {}; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   const removeQuotedMessage = () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     dispatch(quoteMessage(undefined)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   }; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   useKey('Escape', removeQuotedMessage, undefined, []); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   if (!author || !quotedMessageProps?.id) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     return null; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   const contact = findAndFormatContact(author); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   const authorName = contact?.profileName || contact?.name || author || window.i18n('unknown'); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   const hasAttachments = attachments && attachments.length > 0 && attachments[0]; |  |  |  |   const hasAttachments = attachments && attachments.length > 0 && attachments[0]; | 
			
		
	
		
		
			
				
					
					|  |  |  |   const firstImageAttachment = |  |  |  |   const firstImageAttachment = | 
			
		
	
		
		
			
				
					
					|  |  |  |     hasAttachments && attachments[0].contentType !== AUDIO_MP3 && attachments[0].thumbnail |  |  |  |     hasAttachments && attachments[0].contentType !== AUDIO_MP3 && attachments[0].thumbnail | 
			
		
	
	
		
		
			
				
					|  |  | @ -80,16 +93,6 @@ export const SessionQuotedMessageComposition = () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |       ? window.i18n('image') |  |  |  |       ? window.i18n('image') | 
			
		
	
		
		
			
				
					
					|  |  |  |       : null; |  |  |  |       : null; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   const removeQuotedMessage = () => { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     dispatch(quoteMessage(undefined)); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   }; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   useKey('Escape', removeQuotedMessage, undefined, []); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   if (!author || !quotedMessageProps?.id) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     return null; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   return ( |  |  |  |   return ( | 
			
		
	
		
		
			
				
					
					|  |  |  |     <QuotedMessageComposition |  |  |  |     <QuotedMessageComposition | 
			
		
	
		
		
			
				
					
					|  |  |  |       container={true} |  |  |  |       container={true} | 
			
		
	
	
		
		
			
				
					|  |  | @ -129,7 +132,7 @@ export const SessionQuotedMessageComposition = () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |           justifyContent={'center'} |  |  |  |           justifyContent={'center'} | 
			
		
	
		
		
			
				
					
					|  |  |  |           alignItems={'flex-start'} |  |  |  |           alignItems={'flex-start'} | 
			
		
	
		
		
			
				
					
					|  |  |  |         > |  |  |  |         > | 
			
		
	
		
		
			
				
					
					|  |  |  |           <p>{author}</p> |  |  |  |           <p>{authorName}</p> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |           {subtitleText && <Subtle>{subtitleText}</Subtle>} |  |  |  |           {subtitleText && <Subtle>{subtitleText}</Subtle>} | 
			
		
	
		
		
			
				
					
					|  |  |  |         </StyledText> |  |  |  |         </StyledText> | 
			
		
	
		
		
			
				
					
					|  |  |  |       </QuotedMessageCompositionReply> |  |  |  |       </QuotedMessageCompositionReply> | 
			
		
	
	
		
		
			
				
					|  |  | 
 |