pull/1160/head
Mikunj 5 years ago
parent e0f27ba712
commit e7826cfb34

@ -32,6 +32,7 @@ export function encrypt(
} { } {
const plainText = padPlainTextBuffer(plainTextBuffer); const plainText = padPlainTextBuffer(plainTextBuffer);
// TODO: Do encryption here? // TODO: Do encryption here?
return { return {
envelopeType: SignalService.Envelope.Type.CIPHERTEXT, envelopeType: SignalService.Envelope.Type.CIPHERTEXT,
cipherText: new Uint8Array(), cipherText: new Uint8Array(),

@ -35,13 +35,13 @@ export async function sendSessionRequest(
return Promise.resolve(); return Promise.resolve();
} }
export async function sessionEstablished(device: string) { export function sessionEstablished(device: string) {
// TODO: this is called when we receive an encrypted message from the other user // TODO: this is called when we receive an encrypted message from the other user
// Maybe it should be renamed to something else // Maybe it should be renamed to something else
// TODO: This should make `hasSentSessionRequest` return `false` // TODO: This should make `hasSentSessionRequest` return `false`
} }
export async function shouldProcessSessionRequest( export function shouldProcessSessionRequest(
device: string, device: string,
messageTimestamp: number messageTimestamp: number
): boolean { ): boolean {
@ -50,7 +50,7 @@ export async function shouldProcessSessionRequest(
return false; return false;
} }
export async function sessionRequestProcessed(device: string) { export function sessionRequestProcessed(device: string) {
// TODO: this is called when we process the session request // TODO: this is called when we process the session request
// This should store the processed timestamp // This should store the processed timestamp
// Again naming is crap so maybe some other name is better // Again naming is crap so maybe some other name is better

@ -1,5 +1,5 @@
import { MessageQueueInterface } from './MessageQueueInterface'; import { MessageQueueInterface } from './MessageQueueInterface';
import { OutgoingContentMessage, OpenGroupMessage } from '../messages/outgoing'; import { OpenGroupMessage, OutgoingContentMessage } from '../messages/outgoing';
import { JobQueue } from '../utils/JobQueue'; import { JobQueue } from '../utils/JobQueue';
import { PendingMessageCache } from './PendingMessageCache'; import { PendingMessageCache } from './PendingMessageCache';

@ -1,4 +1,4 @@
import { OutgoingContentMessage, OpenGroupMessage } from '../messages/outgoing'; import { OpenGroupMessage, OutgoingContentMessage } from '../messages/outgoing';
// TODO: add all group messages here, replace OutgoingContentMessage with them // TODO: add all group messages here, replace OutgoingContentMessage with them
type GroupMessageType = OpenGroupMessage | OutgoingContentMessage; type GroupMessageType = OpenGroupMessage | OutgoingContentMessage;

@ -4,7 +4,7 @@ import { OutgoingContentMessage } from '../messages/outgoing';
// TODO: We should be able to import functions straight from the db here without going through the window object // TODO: We should be able to import functions straight from the db here without going through the window object
export class PendingMessageCache { export class PendingMessageCache {
private cachedMessages: Array<RawMessage> = []; private readonly cachedMessages: Array<RawMessage> = [];
constructor() { constructor() {
// TODO: We should load pending messages from db here // TODO: We should load pending messages from db here

Loading…
Cancel
Save