|
|
|
@ -10,6 +10,7 @@ import {
|
|
|
|
|
MessageModelPropsWithConvoProps,
|
|
|
|
|
MessageModelPropsWithoutConvoProps,
|
|
|
|
|
MessagePropsDetails,
|
|
|
|
|
PropsForExpiringMessage,
|
|
|
|
|
PropsForQuote,
|
|
|
|
|
QuoteLookupType,
|
|
|
|
|
ReduxConversationType,
|
|
|
|
@ -871,6 +872,29 @@ export const getMessageAttachmentProps = createSelector(getMessagePropsByMessage
|
|
|
|
|
return msgProps;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const getMessageExpirationProps = createSelector(getMessagePropsByMessageId, (props):
|
|
|
|
|
| PropsForExpiringMessage
|
|
|
|
|
| undefined => {
|
|
|
|
|
if (!props || isEmpty(props)) {
|
|
|
|
|
return undefined;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const msgProps: PropsForExpiringMessage = {
|
|
|
|
|
...pick(props.propsForMessage, [
|
|
|
|
|
'convoId',
|
|
|
|
|
'direction',
|
|
|
|
|
'receivedAt',
|
|
|
|
|
'isUnread',
|
|
|
|
|
'expirationTimestamp',
|
|
|
|
|
'expirationLength',
|
|
|
|
|
'isExpired',
|
|
|
|
|
]),
|
|
|
|
|
messageId: props.propsForMessage.id,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return msgProps;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const getIsMessageSelected = createSelector(
|
|
|
|
|
getMessagePropsByMessageId,
|
|
|
|
|
getSelectedMessageIds,
|
|
|
|
|