2020-04-21 00:56:39 +05:30
|
|
|
export class RoomStateStore {
|
2019-02-11 01:55:29 +05:30
|
|
|
constructor(idbStore) {
|
|
|
|
this._roomStateStore = idbStore;
|
|
|
|
}
|
|
|
|
|
2020-06-27 02:56:24 +05:30
|
|
|
async getAllForType(type) {
|
2019-02-11 01:55:29 +05:30
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-06-27 02:56:24 +05:30
|
|
|
async get(type, stateKey) {
|
|
|
|
|
2019-02-11 01:55:29 +05:30
|
|
|
}
|
|
|
|
|
2020-06-27 02:56:24 +05:30
|
|
|
async set(roomId, event) {
|
2019-06-27 01:25:33 +05:30
|
|
|
const key = `${roomId}|${event.type}|${event.state_key}`;
|
|
|
|
const entry = {roomId, event, key};
|
|
|
|
return this._roomStateStore.put(entry);
|
2019-02-11 01:55:29 +05:30
|
|
|
}
|
2019-06-27 01:25:33 +05:30
|
|
|
}
|