mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
fix: send full text body for quote
resolved regression with quote author name
This commit is contained in:
parent
bd8ce826a8
commit
e78d1dfb87
4 changed files with 9 additions and 9 deletions
|
@ -155,6 +155,8 @@ export const SessionMessagesList = (props: {
|
|||
return [<CallNotification key={messageId} {...msgProps} />, ...componentToMerge];
|
||||
}
|
||||
|
||||
// TODO Move Quote rendering logic here maybe?
|
||||
|
||||
if (!messageProps) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ import { FixedBaseEmoji } from '../../../types/Reaction';
|
|||
|
||||
export interface ReplyingToMessageProps {
|
||||
convoId: string;
|
||||
id: string;
|
||||
id: string; // this is the message timestamp
|
||||
author: string;
|
||||
timestamp: number;
|
||||
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 {
|
||||
author: msgSource,
|
||||
id: `${quotedMessage.get('sent_at')}` || '',
|
||||
// no need to quote the full message length.
|
||||
text: sliceQuoteText(body),
|
||||
// NOTE we send the entire body to be consistent with the other platforms
|
||||
text: body,
|
||||
attachments: quotedAttachments,
|
||||
timestamp: quotedMessage.get('sent_at') || 0,
|
||||
convoId: this.id,
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Quote } from './types';
|
|||
import _ from 'lodash';
|
||||
import { getConversationController } from '../session/conversations';
|
||||
import { ConversationModel } from '../models/conversation';
|
||||
import { MessageModel, sliceQuoteText } from '../models/message';
|
||||
import { MessageModel } from '../models/message';
|
||||
import { Data } from '../../ts/data/data';
|
||||
|
||||
import { SignalService } from '../protobuf';
|
||||
|
@ -66,7 +66,8 @@ async function copyFromQuotedMessage(
|
|||
|
||||
window?.log?.info(`Found quoted message id: ${id}`);
|
||||
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
|
||||
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();
|
||||
messageModel.set({ id });
|
||||
|
||||
|
|
Loading…
Reference in a new issue