diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-06-13 15:11:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-13 15:11:10 +0100 |
commit | 4c2a10f1a61a79ed8bbe17af1b28532c3d24c261 (patch) | |
tree | 0e7d3305a13b150828d8eb82ca34cbe1b68b546e /roomserver/api | |
parent | c50095858341cc051e2db97fb85a1bb985f90c66 (diff) |
Handle state before, send history visibility in output (#2532)
* Check state before event
* Tweaks
* Refactor a bit, include in output events
* Don't waste time if soft failed either
* Tweak control flow, comments, use GMSL history visibility type
Diffstat (limited to 'roomserver/api')
-rw-r--r-- | roomserver/api/output.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/roomserver/api/output.go b/roomserver/api/output.go index a82bf870..36d0625c 100644 --- a/roomserver/api/output.go +++ b/roomserver/api/output.go @@ -161,6 +161,8 @@ type OutputNewRoomEvent struct { // The transaction ID of the send request if sent by a local user and one // was specified TransactionID *TransactionID `json:"transaction_id,omitempty"` + // The history visibility of the event. + HistoryVisibility gomatrixserverlib.HistoryVisibility `json:"history_visibility"` } func (o *OutputNewRoomEvent) NeededStateEventIDs() ([]*gomatrixserverlib.HeaderedEvent, []string) { @@ -187,7 +189,8 @@ func (o *OutputNewRoomEvent) NeededStateEventIDs() ([]*gomatrixserverlib.Headere // should build their current room state up from OutputNewRoomEvents only. type OutputOldRoomEvent struct { // The Event. - Event *gomatrixserverlib.HeaderedEvent `json:"event"` + Event *gomatrixserverlib.HeaderedEvent `json:"event"` + HistoryVisibility gomatrixserverlib.HistoryVisibility `json:"history_visibility"` } // An OutputNewInviteEvent is written whenever an invite becomes active. |