Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,13 +534,15 @@ type RespBeeperBatchSend struct {

// RespCapabilities is the JSON response for https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3capabilities
type RespCapabilities struct {
RoomVersions *CapRoomVersions `json:"m.room_versions,omitempty"`
ChangePassword *CapBooleanTrue `json:"m.change_password,omitempty"`
SetDisplayname *CapBooleanTrue `json:"m.set_displayname,omitempty"`
SetAvatarURL *CapBooleanTrue `json:"m.set_avatar_url,omitempty"`
ThreePIDChanges *CapBooleanTrue `json:"m.3pid_changes,omitempty"`
GetLoginToken *CapBooleanTrue `json:"m.get_login_token,omitempty"`
UnstableAccountModeration *CapUnstableAccountModeration `json:"uk.timedout.msc4323,omitempty"`
RoomVersions *CapRoomVersions `json:"m.room_versions,omitempty"`
ChangePassword *CapBooleanTrue `json:"m.change_password,omitempty"`
SetDisplayname *CapBooleanTrue `json:"m.set_displayname,omitempty"`
SetAvatarURL *CapBooleanTrue `json:"m.set_avatar_url,omitempty"`
ThreePIDChanges *CapBooleanTrue `json:"m.3pid_changes,omitempty"`
GetLoginToken *CapBooleanTrue `json:"m.get_login_token,omitempty"`
AccountModeration *CapAccountModeration `json:"m.account_moderation,omitempty"`
ForcedForgetUponLeave *CapBooleanTrue `json:"m.forget_upon_leave,omitempty"`
ProfileFields *CapProfileFields `json:"m.profile_fields,omitempty"`

Custom map[string]interface{} `json:"-"`
}
Expand Down Expand Up @@ -649,11 +651,17 @@ func (vers *CapRoomVersions) IsAvailable(version string) bool {
return available
}

type CapUnstableAccountModeration struct {
type CapAccountModeration struct {
Suspend bool `json:"suspend"`
Lock bool `json:"lock"`
}

type CapProfileFields struct {
Allowed []string `json:"allowed,omitempty"`
Disallowed []string `json:"disallowed,omitempty"`
Enabled bool `json:"enabled"`
}

type RespPublicRooms struct {
Chunk []*PublicRoomInfo `json:"chunk"`
NextBatch string `json:"next_batch,omitempty"`
Expand Down
Loading