all repos — underbbs @ 9dc27a4b9a016a92b6ab8f0041e3c5319e147913

decentralized social media client

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;
}