mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 13:40:47 +00:00
Remove refs to MessageModel in conversations.ts
This commit is contained in:
@@ -46,8 +46,6 @@ import {
|
||||
import { encryptLegacyAttachment } from '../util/encryptLegacyAttachment';
|
||||
import { deepClone } from '../util/deepClone';
|
||||
|
||||
export { hasExpiration } from './Message';
|
||||
|
||||
export const GROUP = 'group';
|
||||
export const PRIVATE = 'private';
|
||||
|
||||
@@ -1039,3 +1037,16 @@ async function deletePreviews(
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
export const isUserMessage = (message: MessageAttributesType): boolean =>
|
||||
message.type === 'incoming' || message.type === 'outgoing';
|
||||
|
||||
export const hasExpiration = (message: MessageAttributesType): boolean => {
|
||||
if (!isUserMessage(message)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const { expireTimer } = message;
|
||||
|
||||
return typeof expireTimer === 'number' && expireTimer > 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user