You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
513 B
TypeScript
23 lines
513 B
TypeScript
5 years ago
|
import { PendingMessageCache } from '../../../../session/sending';
|
||
|
import { RawMessage } from '../../../../session/types';
|
||
|
|
||
|
export class PendingMessageCacheStub extends PendingMessageCache {
|
||
|
public dbData: Array<RawMessage>;
|
||
|
constructor(dbData: Array<RawMessage> = []) {
|
||
|
super();
|
||
|
this.dbData = dbData;
|
||
|
}
|
||
|
|
||
|
public getCache(): Readonly<Array<RawMessage>> {
|
||
|
return this.cache;
|
||
|
}
|
||
|
|
||
|
protected async getFromStorage() {
|
||
|
return this.dbData;
|
||
|
}
|
||
|
|
||
|
protected async saveToDB() {
|
||
|
return;
|
||
|
}
|
||
|
}
|