all repos — underbbs @ fead16168a5af4d28606cc1a7cef0b23ce85ed6c

decentralized social media client

frontend/ts/adapter.ts (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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>;
  
  constructor(protocol: string) {
    this.protocol = protocol;
    this.messages = new Map<string, Message>();
    this.directMessages = new Map<string, Message>();
    this.profileCache = new Map<string, Author>();
  }
}

export interface AdapterState {
  [nickname: string]: AdapterData;
}