Repair broken attachments with non-array 'data' fields
This commit is contained in:
parent
a0424be5bb
commit
2f252b8e26
10 changed files with 105 additions and 34 deletions
|
@ -93,6 +93,9 @@ import * as log from '../../logging/log';
|
|||
import { getConversationColorAttributes } from '../../util/getConversationColorAttributes';
|
||||
import { DAY, HOUR } from '../../util/durations';
|
||||
import { getStoryReplyText } from '../../util/getStoryReplyText';
|
||||
import { isIncoming, isOutgoing, isStory } from '../../messages/helpers';
|
||||
|
||||
export { isIncoming, isOutgoing, isStory };
|
||||
|
||||
const THREE_HOURS = 3 * HOUR;
|
||||
const linkify = LinkifyIt();
|
||||
|
@ -129,24 +132,6 @@ export type GetPropsForBubbleOptions = Readonly<{
|
|||
contactNameColorSelector: ContactNameColorSelectorType;
|
||||
}>;
|
||||
|
||||
export function isIncoming(
|
||||
message: Pick<MessageWithUIFieldsType, 'type'>
|
||||
): boolean {
|
||||
return message.type === 'incoming';
|
||||
}
|
||||
|
||||
export function isOutgoing(
|
||||
message: Pick<MessageWithUIFieldsType, 'type'>
|
||||
): boolean {
|
||||
return message.type === 'outgoing';
|
||||
}
|
||||
|
||||
export function isStory(
|
||||
message: Pick<MessageWithUIFieldsType, 'type'>
|
||||
): boolean {
|
||||
return message.type === 'story';
|
||||
}
|
||||
|
||||
export function hasErrors(
|
||||
message: Pick<MessageWithUIFieldsType, 'errors'>
|
||||
): boolean {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue