Send @mentions

This commit is contained in:
Chris Svenningsen 2020-11-02 17:19:52 -08:00 committed by Evan Hahn
parent 63c4cf9430
commit 53c89aa40f
28 changed files with 1728 additions and 107 deletions

View file

@ -17,6 +17,7 @@ import { trigger } from '../../shims/events';
import { NoopActionType } from './noop';
import { AttachmentType } from '../../types/Attachment';
import { ColorType } from '../../types/Colors';
import { BodyRangeType } from '../../types/Util';
// State
@ -66,6 +67,7 @@ export type ConversationType = {
phoneNumber?: string;
membersCount?: number;
expireTimer?: number;
members?: Array<ConversationType>;
muteExpiresAt?: number;
type: ConversationTypeType;
isMe?: boolean;
@ -83,6 +85,7 @@ export type ConversationType = {
shouldShowDraft?: boolean;
draftText?: string | null;
draftBodyRanges?: Array<BodyRangeType>;
draftPreview?: string;
sharedGroupNames?: Array<string>;

View file

@ -37,7 +37,7 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
throw new Error(`Conversation id ${id} not found!`);
}
const { draftText } = conversation;
const { draftText, draftBodyRanges } = conversation;
const receivedPacks = getReceivedStickerPacks(state);
const installedPacks = getInstalledStickerPacks(state);
@ -61,7 +61,8 @@ const mapStateToProps = (state: StateType, props: ExternalProps) => {
return {
// Base
i18n: getIntl(state),
startingText: draftText,
draftText,
draftBodyRanges,
// Emojis
recentEmojis,
skinTone: get(state, ['items', 'skinTone'], 0),