22 lines
710 B
TypeScript
22 lines
710 B
TypeScript
import {Message, Author} from "./message"
|
|
export class AdapterData {
|
|
public protocol: string;
|
|
public directMessages: Map<string, Message>;
|
|
public messages: Map<string, Message>;
|
|
public profileCache: Map<string, Author>;
|
|
public convoyCache: Map<string, string>;
|
|
|
|
constructor(protocol: string) {
|
|
this.protocol = protocol;
|
|
this.messages = new Map<string, Message>();
|
|
this.directMessages = new Map<string, Message>();
|
|
this.profileCache = new Map<string, Author>();
|
|
this.convoyCache = new Map<string, string>();
|
|
}
|
|
}
|
|
|
|
export class AdapterState {
|
|
public data: Map<string, AdapterData> = new Map<string, AdapterData>();
|
|
|
|
static _instance: AdapterState = new AdapterState();
|
|
}
|