mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-24 03:55:09 +01:00
Add an interface for events
This commit is contained in:
parent
6c6991e622
commit
1f368dcec1
@ -20,6 +20,19 @@ import { encodeUint32 } from "../utils";
|
|||||||
import {KeyLimits} from "../../common";
|
import {KeyLimits} from "../../common";
|
||||||
import {Store} from "../Store";
|
import {Store} from "../Store";
|
||||||
|
|
||||||
|
type Content = { [key: string]: any }
|
||||||
|
|
||||||
|
interface RoomEvent {
|
||||||
|
content: Content
|
||||||
|
type: string
|
||||||
|
event_id: string
|
||||||
|
sender: string
|
||||||
|
origin_server_ts: number
|
||||||
|
unsigned?: Content
|
||||||
|
}
|
||||||
|
|
||||||
|
type StateEvent = RoomEvent & { prev_content?: Content, state_key: string }
|
||||||
|
|
||||||
interface Annotation {
|
interface Annotation {
|
||||||
count: number
|
count: number
|
||||||
me: boolean
|
me: boolean
|
||||||
@ -30,7 +43,7 @@ interface StorageEntry {
|
|||||||
roomId: string
|
roomId: string
|
||||||
fragmentId: number
|
fragmentId: number
|
||||||
eventIndex: number
|
eventIndex: number
|
||||||
event: any
|
event: Event | StateEvent
|
||||||
displayName?: string
|
displayName?: string
|
||||||
avatarUrl?: string
|
avatarUrl?: string
|
||||||
annotations?: { [key : string]: Annotation }
|
annotations?: { [key : string]: Annotation }
|
||||||
|
Loading…
Reference in New Issue
Block a user