Fix tests

This commit is contained in:
Tulir Asokan
2018-11-14 01:11:40 +02:00
parent a0815a6f3d
commit 912bf309d1
13 changed files with 181 additions and 178 deletions

View File

@ -200,9 +200,9 @@ type Content struct {
PowerLevels
Member
Aliases []string `json:"aliases,omitempty"`
CanonicalAlias
RoomName
RoomTopic
Alias string `json:"alias,omitempty"`
Name string `json:"name,omitempty"`
Topic string `json:"name,omitempty"`
RoomTags Tags `json:"tags,omitempty"`
TypingUserIDs []string `json:"user_ids,omitempty"`
@ -244,11 +244,6 @@ func (content *Content) UnmarshalMember() (m Member, err error) {
return
}
func (content *Content) UnmarshalCanonicalAlias() (ca CanonicalAlias, err error) {
err = json.Unmarshal(content.VeryRaw, &ca)
return
}
func (content *Content) GetInfo() *FileInfo {
if content.Info == nil {
content.Info = &FileInfo{}
@ -260,14 +255,6 @@ type Tags map[string]struct {
Order json.Number `json:"order"`
}
type RoomName struct {
Name string `json:"name,omitempty"`
}
type RoomTopic struct {
Topic string `json:"topic,omitempty"`
}
// Membership is an enum specifying the membership state of a room member.
type Membership string
@ -297,10 +284,6 @@ type ThirdPartyInvite struct {
}
}
type CanonicalAlias struct {
Alias string `json:"alias,omitempty"`
}
type PowerLevels struct {
usersLock sync.RWMutex `json:"-"`
Users map[string]int `json:"users,omitempty"`