Update protocol
This commit is contained in:
parent
daf2a8be34
commit
80a6cc017a
3 changed files with 31 additions and 16 deletions
|
@ -2,9 +2,9 @@
|
|||
"doc_version": "v1",
|
||||
"version": {
|
||||
"name": "signald",
|
||||
"version": "0.12.0+git2021-02-18r64bd433c.35",
|
||||
"version": "0.12.0+git2021-02-18r577f6d0f.36",
|
||||
"branch": "main",
|
||||
"commit": "64bd433c25d9f66523171d53aa7a26ec921a6473"
|
||||
"commit": "577f6d0f076466fe6006fea2e99c53519531830b"
|
||||
},
|
||||
"info": "This document describes objects that may be used when communicating with signald.",
|
||||
"types": {
|
||||
|
@ -34,7 +34,7 @@
|
|||
},
|
||||
"timestamp": {
|
||||
"type": "long",
|
||||
"example": "1613632213480"
|
||||
"example": "1613676833495"
|
||||
},
|
||||
"timestampISO": {
|
||||
"type": "String"
|
||||
|
@ -44,7 +44,7 @@
|
|||
},
|
||||
"serverDeliveredTimestamp": {
|
||||
"type": "long",
|
||||
"example": "161363221348080"
|
||||
"example": "161367683349580"
|
||||
},
|
||||
"hasLegacyMessage": {
|
||||
"type": "boolean"
|
||||
|
@ -124,7 +124,7 @@
|
|||
},
|
||||
"timestamp": {
|
||||
"type": "long",
|
||||
"example": "1613632213480"
|
||||
"example": "1613676833495"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -165,7 +165,7 @@
|
|||
},
|
||||
"version": {
|
||||
"type": "String",
|
||||
"example": "\"0.12.0+git2021-02-18r64bd433c.35\""
|
||||
"example": "\"0.12.0+git2021-02-18r577f6d0f.36\""
|
||||
},
|
||||
"branch": {
|
||||
"type": "String",
|
||||
|
@ -173,7 +173,7 @@
|
|||
},
|
||||
"commit": {
|
||||
"type": "String",
|
||||
"example": "\"64bd433c25d9f66523171d53aa7a26ec921a6473\""
|
||||
"example": "\"577f6d0f076466fe6006fea2e99c53519531830b\""
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -517,7 +517,7 @@
|
|||
"list": true,
|
||||
"type": "Long",
|
||||
"doc": "List of messages to mark as read",
|
||||
"example": "1613632213480",
|
||||
"example": "1613676833495",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
|
@ -673,6 +673,16 @@
|
|||
"fields": {},
|
||||
"doc": "Generate a linking URI. Typically this is QR encoded and scanned by the primary device. Submit the returned session_id with a finish_link request."
|
||||
},
|
||||
"LinkingURI": {
|
||||
"fields": {
|
||||
"uri": {
|
||||
"type": "String"
|
||||
},
|
||||
"session_id": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"FinishLinkRequest": {
|
||||
"fields": {
|
||||
"device_name": {
|
||||
|
@ -706,7 +716,7 @@
|
|||
"timestamp": {
|
||||
"type": "long",
|
||||
"doc": "the timestamp that the message was sent at, according to the sender's device. This is used to uniquely identify this message for things like reactions and quotes.",
|
||||
"example": "1613632213480"
|
||||
"example": "1613676833495"
|
||||
},
|
||||
"attachments": {
|
||||
"list": true,
|
||||
|
@ -843,7 +853,7 @@
|
|||
"id": {
|
||||
"type": "long",
|
||||
"doc": "the client timestamp of the message being quoted",
|
||||
"example": "1613632213480"
|
||||
"example": "1613676833495"
|
||||
},
|
||||
"author": {
|
||||
"type": "JsonAddress",
|
||||
|
@ -931,7 +941,7 @@
|
|||
"targetSentTimestamp": {
|
||||
"type": "long",
|
||||
"doc": "the client timestamp of the message being reacted to",
|
||||
"example": "1613632213480"
|
||||
"example": "1613676833495"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1011,7 +1021,7 @@
|
|||
},
|
||||
"timestamp": {
|
||||
"type": "long",
|
||||
"example": "1613632213480"
|
||||
"example": "1613676833495"
|
||||
},
|
||||
"expirationStartTimestamp": {
|
||||
"type": "long"
|
||||
|
@ -1049,7 +1059,7 @@
|
|||
},
|
||||
"timestamp": {
|
||||
"type": "long",
|
||||
"example": "1613632213480"
|
||||
"example": "1613676833495"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1061,7 +1071,7 @@
|
|||
},
|
||||
"timestamp": {
|
||||
"type": "long",
|
||||
"example": "1613632213480"
|
||||
"example": "1613676833495"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1838,7 +1848,7 @@
|
|||
},
|
||||
"generate_linking_uri": {
|
||||
"request": "GenerateLinkingURIRequest",
|
||||
"response": "String",
|
||||
"response": "LinkingURI",
|
||||
"doc": "Generate a linking URI. Typically this is QR encoded and scanned by the primary device. Submit the returned session_id with a finish_link request."
|
||||
},
|
||||
"finish_link": {
|
||||
|
|
|
@ -141,7 +141,7 @@ func (r *FinishLinkRequest) Submit(conn *signald.Signald) (response Account, err
|
|||
}
|
||||
|
||||
// Submit: Generate a linking URI. Typically this is QR encoded and scanned by the primary device. Submit the returned session_id with a finish_link request.
|
||||
func (r *GenerateLinkingURIRequest) Submit(conn *signald.Signald) (response string, err error) {
|
||||
func (r *GenerateLinkingURIRequest) Submit(conn *signald.Signald) (response LinkingURI, err error) {
|
||||
r.Version = "v1"
|
||||
r.Type = "generate_linking_uri"
|
||||
if r.ID == "" {
|
||||
|
|
|
@ -292,6 +292,11 @@ type LinkedDevices struct {
|
|||
Devices []*v0.DeviceInfo `json:"devices,omitempty" yaml:"devices,omitempty"`
|
||||
}
|
||||
|
||||
type LinkingURI struct {
|
||||
SessionId string `json:"session_id,omitempty" yaml:"session_id,omitempty"`
|
||||
Uri string `json:"uri,omitempty" yaml:"uri,omitempty"`
|
||||
}
|
||||
|
||||
type ListContactsRequest struct {
|
||||
Request
|
||||
Account string `json:"account,omitempty" yaml:"account,omitempty"`
|
||||
|
|
Loading…
Reference in a new issue