mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
cf44896a03
* show missed-call,started-call and answered call notification in chat * fix types for createLastMessageUpdate * show incoming dialog if we have a pending call when enable call receptio * simplify a bit the avatar component * move disableDrag to a custom hook * speed up hash colors of avatarPlaceHolders * fixup text selection and double click reply on message * keep avatar decoded items longer before releasing memory * add incoming/outgoing/missed call notification also, merge that notification with the timer and group notification component * hangup call if no answer after 30sec * refactor SessionInput using hook + add testid field for recovery * disable message request feature flag for now * fix merge issue * force loading screen to be black instead of white for our dark theme user's eyes safety
56 lines
1.2 KiB
TypeScript
56 lines
1.2 KiB
TypeScript
import { Attachment } from './Attachment';
|
|
import { IndexableBoolean, IndexablePresence } from './IndexedDB';
|
|
|
|
export type Message = UserMessage;
|
|
export type UserMessage = IncomingMessage;
|
|
|
|
export type IncomingMessage = Readonly<
|
|
{
|
|
type: 'incoming';
|
|
// Required
|
|
attachments: Array<Attachment>;
|
|
id: string;
|
|
received_at: number;
|
|
|
|
// Optional
|
|
body?: string;
|
|
decrypted_at?: number;
|
|
errors?: Array<any>;
|
|
expireTimer?: number;
|
|
flags?: number;
|
|
source?: string;
|
|
sourceDevice?: number;
|
|
} & SharedMessageProperties &
|
|
MessageSchemaVersion5 &
|
|
ExpirationTimerUpdate
|
|
>;
|
|
|
|
type SharedMessageProperties = Readonly<{
|
|
conversationId: string;
|
|
sent_at: number;
|
|
timestamp: number;
|
|
}>;
|
|
|
|
type ExpirationTimerUpdate = Partial<
|
|
Readonly<{
|
|
expirationTimerUpdate: Readonly<{
|
|
expireTimer: number;
|
|
fromSync: boolean;
|
|
source: string;
|
|
}>;
|
|
}>
|
|
>;
|
|
|
|
type MessageSchemaVersion5 = Partial<
|
|
Readonly<{
|
|
hasAttachments: IndexableBoolean;
|
|
hasVisualMediaAttachments: IndexablePresence;
|
|
hasFileAttachments: IndexablePresence;
|
|
}>
|
|
>;
|
|
|
|
export type LokiProfile = {
|
|
displayName: string;
|
|
avatarPointer?: string;
|
|
profileKey: Uint8Array | null;
|
|
};
|