fix: send full text body for quote

resolved regression with quote author name
pull/2757/head
William Grant 2 years ago
parent bd8ce826a8
commit e78d1dfb87

@ -155,6 +155,8 @@ export const SessionMessagesList = (props: {
return [<CallNotification key={messageId} {...msgProps} />, ...componentToMerge]; return [<CallNotification key={messageId} {...msgProps} />, ...componentToMerge];
} }
// TODO Move Quote rendering logic here maybe?
if (!messageProps) { if (!messageProps) {
return null; return null;
} }

@ -60,7 +60,7 @@ import { FixedBaseEmoji } from '../../../types/Reaction';
export interface ReplyingToMessageProps { export interface ReplyingToMessageProps {
convoId: string; convoId: string;
id: string; id: string; // this is the message timestamp
author: string; author: string;
timestamp: number; timestamp: number;
text?: string; text?: string;

@ -518,14 +518,11 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {
} }
} }
const { title, isMe } = quotedMessage.findAndFormatContact(msgSource);
msgSource = isMe ? window.i18n('you') : title ? title : msgSource;
return { return {
author: msgSource, author: msgSource,
id: `${quotedMessage.get('sent_at')}` || '', id: `${quotedMessage.get('sent_at')}` || '',
// no need to quote the full message length. // NOTE we send the entire body to be consistent with the other platforms
text: sliceQuoteText(body), text: body,
attachments: quotedAttachments, attachments: quotedAttachments,
timestamp: quotedMessage.get('sent_at') || 0, timestamp: quotedMessage.get('sent_at') || 0,
convoId: this.id, convoId: this.id,

@ -4,7 +4,7 @@ import { Quote } from './types';
import _ from 'lodash'; import _ from 'lodash';
import { getConversationController } from '../session/conversations'; import { getConversationController } from '../session/conversations';
import { ConversationModel } from '../models/conversation'; import { ConversationModel } from '../models/conversation';
import { MessageModel, sliceQuoteText } from '../models/message'; import { MessageModel } from '../models/message';
import { Data } from '../../ts/data/data'; import { Data } from '../../ts/data/data';
import { SignalService } from '../protobuf'; import { SignalService } from '../protobuf';
@ -66,7 +66,8 @@ async function copyFromQuotedMessage(
window?.log?.info(`Found quoted message id: ${id}`); window?.log?.info(`Found quoted message id: ${id}`);
quoteLocal.referencedMessageNotFound = false; quoteLocal.referencedMessageNotFound = false;
quoteLocal.text = sliceQuoteText(found.get('body') || ''); // NOTE we send the entire body to be consistent with the other platforms
quoteLocal.text = found.get('body') || '';
// no attachments, just save the quote with the body // no attachments, just save the quote with the body
if ( if (
@ -367,7 +368,7 @@ export async function handleMessageJob(
); );
} }
// save the message model to the db and it save the messageId generated to our in-memory copy // save the message model to the db and then save the messageId generated to our in-memory copy
const id = await messageModel.commit(); const id = await messageModel.commit();
messageModel.set({ id }); messageModel.set({ id });

Loading…
Cancel
Save