Skip to content

Commit a36f60a

Browse files
committed
Parse Beeper inbox preview event in sync
1 parent 311a20c commit a36f60a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

responses.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,12 @@ func (slr SyncLeftRoom) MarshalJSON() ([]byte, error) {
309309
return marshalAndDeleteEmpty((marshalableSyncLeftRoom)(slr), syncLeftRoomPathsToDelete)
310310
}
311311

312+
type BeeperInboxPreviewEvent struct {
313+
EventID id.EventID `json:"event_id"`
314+
Timestamp jsontime.UnixMilli `json:"origin_server_ts"`
315+
Event *event.Event `json:"event,omitempty"`
316+
}
317+
312318
type SyncJoinedRoom struct {
313319
Summary LazyLoadSummary `json:"summary"`
314320
State SyncEventsList `json:"state"`
@@ -319,6 +325,8 @@ type SyncJoinedRoom struct {
319325
UnreadNotifications *UnreadNotificationCounts `json:"unread_notifications,omitempty"`
320326
// https://github.com/matrix-org/matrix-spec-proposals/pull/2654
321327
MSC2654UnreadCount *int `json:"org.matrix.msc2654.unread_count,omitempty"`
328+
// Beeper extension
329+
BeeperInboxPreview *BeeperInboxPreviewEvent `json:"com.beeper.inbox.preview,omitempty"`
322330
}
323331

324332
type UnreadNotificationCounts struct {

0 commit comments

Comments
 (0)