mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Add sender_key
to ClientEvent (#3110)
This commit is contained in:
parent
77d9e4e93d
commit
82b73a4906
1 changed files with 4 additions and 0 deletions
|
@ -37,6 +37,7 @@ type ClientEvent struct {
|
||||||
OriginServerTS spec.Timestamp `json:"origin_server_ts,omitempty"` // OriginServerTS is omitted on receipt events
|
OriginServerTS spec.Timestamp `json:"origin_server_ts,omitempty"` // OriginServerTS is omitted on receipt events
|
||||||
RoomID string `json:"room_id,omitempty"` // RoomID is omitted on /sync responses
|
RoomID string `json:"room_id,omitempty"` // RoomID is omitted on /sync responses
|
||||||
Sender string `json:"sender,omitempty"` // Sender is omitted on receipt events
|
Sender string `json:"sender,omitempty"` // Sender is omitted on receipt events
|
||||||
|
SenderKey spec.SenderID `json:"sender_key,omitempty"` // The SenderKey for events in pseudo ID rooms
|
||||||
StateKey *string `json:"state_key,omitempty"`
|
StateKey *string `json:"state_key,omitempty"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Unsigned spec.RawJSON `json:"unsigned,omitempty"`
|
Unsigned spec.RawJSON `json:"unsigned,omitempty"`
|
||||||
|
@ -84,6 +85,9 @@ func ToClientEvent(se gomatrixserverlib.PDU, format ClientEventFormat, sender sp
|
||||||
if format == FormatAll {
|
if format == FormatAll {
|
||||||
ce.RoomID = se.RoomID()
|
ce.RoomID = se.RoomID()
|
||||||
}
|
}
|
||||||
|
if se.Version() == gomatrixserverlib.RoomVersionPseudoIDs {
|
||||||
|
ce.SenderKey = se.SenderID()
|
||||||
|
}
|
||||||
return ce
|
return ce
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue