mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Add some comments and other changes to crypto stuff
This commit is contained in:
parent
173dce8619
commit
ea5cf3ee5e
12 changed files with 194 additions and 42 deletions
|
|
@ -120,3 +120,22 @@ type RequestedKeyInfo struct {
|
|||
SenderKey id.SenderKey `json:"sender_key"`
|
||||
SessionID id.SessionID `json:"session_id"`
|
||||
}
|
||||
|
||||
type RoomKeyWithheldCode string
|
||||
|
||||
const (
|
||||
RoomKeyWithheldBlacklisted RoomKeyWithheldCode = "m.blacklisted"
|
||||
RoomKeyWithheldUnverified RoomKeyWithheldCode = "m.unverified"
|
||||
RoomKeyWithheldUnauthorized RoomKeyWithheldCode = "m.unauthorized"
|
||||
RoomKeyWithheldUnavailable RoomKeyWithheldCode = "m.unavailable"
|
||||
RoomKeyWithheldNoOlmSession RoomKeyWithheldCode = "m.no_olm"
|
||||
)
|
||||
|
||||
type RoomKeyWithheldEventContent struct {
|
||||
RoomID id.RoomID `json:"room_id,omitempty"`
|
||||
Algorithm id.Algorithm `json:"algorithm"`
|
||||
SessionID id.SessionID `json:"session_id,omitempty"`
|
||||
SenderKey id.SenderKey `json:"sender_key"`
|
||||
Code RoomKeyWithheldCode `json:"code"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue