2024-06-30 00:18:31 +00:00
|
|
|
import {Message, Author} from "./message"
|
|
|
|
export class AdapterData {
|
|
|
|
public protocol: string;
|
2024-07-01 03:51:25 +00:00
|
|
|
public directMessages: Map<string, Message>;
|
|
|
|
public messages: Map<string, Message>;
|
2024-06-30 00:18:31 +00:00
|
|
|
public profileCache: Map<string, Author>;
|
2024-08-03 16:52:33 +00:00
|
|
|
public convoyCache: Map<string, string>;
|
2024-06-30 00:18:31 +00:00
|
|
|
|
|
|
|
constructor(protocol: string) {
|
|
|
|
this.protocol = protocol;
|
2024-07-01 03:51:25 +00:00
|
|
|
this.messages = new Map<string, Message>();
|
|
|
|
this.directMessages = new Map<string, Message>();
|
|
|
|
this.profileCache = new Map<string, Author>();
|
2024-08-03 16:52:33 +00:00
|
|
|
this.convoyCache = new Map<string, string>();
|
2024-04-27 22:39:53 +00:00
|
|
|
}
|
2024-04-27 16:50:27 +00:00
|
|
|
}
|
|
|
|
|
2024-07-16 19:43:35 +00:00
|
|
|
export class AdapterState {
|
|
|
|
public data: Map<string, AdapterData> = new Map<string, AdapterData>();
|
|
|
|
|
|
|
|
static _instance: AdapterState = new AdapterState();
|
|
|
|
}
|