mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +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 {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 {
|
||||
count: number
|
||||
me: boolean
|
||||
@ -30,7 +43,7 @@ interface StorageEntry {
|
||||
roomId: string
|
||||
fragmentId: number
|
||||
eventIndex: number
|
||||
event: any
|
||||
event: Event | StateEvent
|
||||
displayName?: string
|
||||
avatarUrl?: string
|
||||
annotations?: { [key : string]: Annotation }
|
||||
|
Loading…
Reference in New Issue
Block a user