bump protocol

This commit is contained in:
finn 2022-08-16 09:57:10 -07:00
parent 5e52e5f3bd
commit 1ced8e01b2
3 changed files with 21 additions and 5526 deletions

File diff suppressed because one or more lines are too long

View file

@ -284,6 +284,13 @@ func mkerr(response client_protocol.BasicResponse) error {
return err
}
return result
case "UnsupportedGroupError":
result := UnsupportedGroupError{}
err := json.Unmarshal(response.Error, &result)
if err != nil {
return err
}
return result
case "UntrustedIdentityError":
result := UntrustedIdentityError{}
err := json.Unmarshal(response.Error, &result)
@ -645,6 +652,15 @@ func (e UnregisteredUserError) Error() string {
return e.Message
}
// UnsupportedGroupError: returned in response to use v1 groups, which are no longer supported
type UnsupportedGroupError struct {
Message string `json:"message,omitempty" yaml:"message,omitempty"`
}
func (e UnsupportedGroupError) Error() string {
return e.Message
}
type UntrustedIdentityError struct {
Identifier string `json:"identifier,omitempty" yaml:"identifier,omitempty"`
IdentityKey **IdentityKey `json:"identity_key,omitempty" yaml:"identity_key,omitempty"`

View file

@ -263,7 +263,7 @@ type GroupLinkInfoRequest struct {
type GroupList struct {
Groups []*JsonGroupV2Info `json:"groups,omitempty" yaml:"groups,omitempty"`
LegacyGroups []*JsonGroupInfo `json:"legacyGroups,omitempty" yaml:"legacyGroups,omitempty"`
LegacyGroups []*JsonGroupInfo `json:"legacyGroups,omitempty" yaml:"legacyGroups,omitempty"` // list of legacy (v1) groups, no longer supported (will always be empty)
}
type GroupMember struct {
@ -492,6 +492,7 @@ type JsonSentTranscriptMessage struct {
ExpirationStartTimestamp int64 `json:"expirationStartTimestamp,omitempty" yaml:"expirationStartTimestamp,omitempty"`
IsRecipientUpdate bool `json:"isRecipientUpdate,omitempty" yaml:"isRecipientUpdate,omitempty"`
Message *JsonDataMessage `json:"message,omitempty" yaml:"message,omitempty"`
Story *StoryMessage `json:"story,omitempty" yaml:"story,omitempty"`
Timestamp int64 `json:"timestamp,omitempty" yaml:"timestamp,omitempty"`
UnidentifiedStatus map[string]string `json:"unidentifiedStatus,omitempty" yaml:"unidentifiedStatus,omitempty"`
}
@ -599,7 +600,8 @@ type Profile struct {
Address *JsonAddress `json:"address,omitempty" yaml:"address,omitempty"`
Avatar string `json:"avatar,omitempty" yaml:"avatar,omitempty"` // path to avatar on local disk
Capabilities *Capabilities `json:"capabilities,omitempty" yaml:"capabilities,omitempty"`
Color string `json:"color,omitempty" yaml:"color,omitempty"` // color of the chat with this user
Color string `json:"color,omitempty" yaml:"color,omitempty"` // color of the chat with this user
ContactName string `json:"contact_name,omitempty" yaml:"contact_name,omitempty"` // The user's name from local contact names
Emoji string `json:"emoji,omitempty" yaml:"emoji,omitempty"`
ExpirationTime int32 `json:"expiration_time,omitempty" yaml:"expiration_time,omitempty"`
InboxPosition int32 `json:"inbox_position,omitempty" yaml:"inbox_position,omitempty"`