diff --git a/signald/client-protocol/v0/signaldresponse.go b/signald/client-protocol/v0/signaldresponse.go index 1ac0349..9960afe 100644 --- a/signald/client-protocol/v0/signaldresponse.go +++ b/signald/client-protocol/v0/signaldresponse.go @@ -43,14 +43,25 @@ type Account struct { // DataMessage is the main component of incoming text messages type DataMessage struct { - Timestamp int64 `json:",omitempty"` - Body string `json:",omitempty"` - ExpiresInSeconds int64 `json:",omitempty"` - GroupInfo IncomingGroupInfo `json:"group,omitempty"` + Timestamp int64 `json:",omitempty"` + Body string `json:",omitempty"` + ExpiresInSeconds int64 `json:",omitempty"` + GroupInfo IncomingGroupInfo `json:"group,omitempty"` + GroupV2 IncomingGroupV2Info `json:"groupV2,omitempty"` } -// IncomingGroupInfo is information about a particular group +// IncomingGroupInfo is information about a particular legacy group type IncomingGroupInfo struct { GroupID string `json:",omitempty"` Type string `json:",omitempty"` } + +// IncomingGroupV2Info is a stripped down copy of v1.JsonGroupV2Info because v0 can't depend on v1 +type IncomingGroupV2Info struct { + Avatar string `json:"avatar,omitempty" yaml:"avatar,omitempty"` // path to the group's avatar on local disk, if available + ID string `json:"id,omitempty" yaml:"id,omitempty"` + InviteLink string `json:"inviteLink,omitempty" yaml:"inviteLink,omitempty"` // the signal.group link, if applicable + Revision int32 `json:"revision,omitempty" yaml:"revision,omitempty"` + Timer int32 `json:"timer,omitempty" yaml:"timer,omitempty"` + Title string `json:"title,omitempty" yaml:"title,omitempty"` +}