@@ -190,38 +190,38 @@ type ListInstalledStickerPacksResponse struct {
190190}
191191
192192type ContactProfile struct {
193- GivenName string `json:"given_name"`
194- FamilyName string `json:"lastname"`
195- About string `json:"about"`
196- HasAvatar bool `json:"has_avatar"`
197- LastUpdatedTimestamp int64 `json:"last_updated_timestamp"`
193+ GivenName string `json:"given_name"`
194+ FamilyName string `json:"lastname"`
195+ About string `json:"about"`
196+ HasAvatar bool `json:"has_avatar"`
197+ LastUpdatedTimestamp int64 `json:"last_updated_timestamp"`
198198}
199199
200200type Nickname struct {
201- Name string `json:"name"`
202- GivenName string `json:"given_name"`
201+ Name string `json:"name"`
202+ GivenName string `json:"given_name"`
203203 FamilyName string `json:"family_name"`
204204}
205205
206206type ListContactsResponse struct {
207- Number string `json:"number"`
208- Uuid string `json:"uuid"`
209- Name string `json:"name"`
210- ProfileName string `json:"profile_name"`
211- Username string `json:"username"`
212- Color string `json:"color"`
213- Blocked bool `json:"blocked"`
214- MessageExpiration string `json:"message_expiration"`
215- Note string `json:"note"`
216- Profile ContactProfile `json:"profile"`
217- GivenName string `json:"given_name"`
218- Nickname Nickname `json:"nickname"`
207+ Number string `json:"number"`
208+ Uuid string `json:"uuid"`
209+ Name string `json:"name"`
210+ ProfileName string `json:"profile_name"`
211+ Username string `json:"username"`
212+ Color string `json:"color"`
213+ Blocked bool `json:"blocked"`
214+ MessageExpiration string `json:"message_expiration"`
215+ Note string `json:"note"`
216+ Profile ContactProfile `json:"profile"`
217+ GivenName string `json:"given_name"`
218+ Nickname Nickname `json:"nickname"`
219219}
220220
221221type ListDevicesResponse struct {
222- Name string `json:"name"`
223- LastSeenTimestamp int64 `json:"last_seen_timestamp"`
224- CreationTimestamp int64 `json:"creation_timestamp"`
222+ Name string `json:"name"`
223+ LastSeenTimestamp int64 `json:"last_seen_timestamp"`
224+ CreationTimestamp int64 `json:"creation_timestamp"`
225225}
226226
227227func cleanupTmpFiles (paths []string ) {
@@ -1311,7 +1311,7 @@ func (s *SignalClient) GetGroupAvatar(number string, groupId string) ([]byte, er
13111311 rawData , err = jsonRpc2Client .getRaw ("getAvatar" , & number , request )
13121312 if err != nil {
13131313 if err .Error () == "Could not find avatar" {
1314- return []byte {},& NotFoundError {Description : "No avatar found." }
1314+ return []byte {}, & NotFoundError {Description : "No avatar found." }
13151315 }
13161316 return []byte {}, err
13171317 }
@@ -1480,7 +1480,7 @@ func (s *SignalClient) GetAccounts() ([]string, error) {
14801480func (s * SignalClient ) GetAttachments () ([]string , error ) {
14811481 files := []string {}
14821482
1483- attachmentsPath := s .signalCliConfig + "/attachments/"
1483+ attachmentsPath := s .signalCliConfig + "/attachments/"
14841484 if _ , err := os .Stat (attachmentsPath ); ! os .IsNotExist (err ) {
14851485 err = filepath .Walk (attachmentsPath , func (path string , info os.FileInfo , err error ) error {
14861486 if info .IsDir () {
@@ -2149,10 +2149,10 @@ func (s *SignalClient) ListDevices(number string) ([]ListDevicesResponse, error)
21492149 resp := []ListDevicesResponse {}
21502150
21512151 type ListDevicesSignalCliResponse struct {
2152- Id int64 `json:"id"`
2153- Name string `json:"name"`
2154- CreatedTimestamp int64 `json:"createdTimestamp"`
2155- LastSeenTimestamp int64 `json:"lastSeenTimestamp"`
2152+ Id int64 `json:"id"`
2153+ Name string `json:"name"`
2154+ CreatedTimestamp int64 `json:"createdTimestamp"`
2155+ LastSeenTimestamp int64 `json:"lastSeenTimestamp"`
21562156 }
21572157
21582158 var err error
@@ -2180,7 +2180,7 @@ func (s *SignalClient) ListDevices(number string) ([]ListDevicesResponse, error)
21802180
21812181 for _ , entry := range signalCliResp {
21822182 deviceEntry := ListDevicesResponse {
2183- Name : entry .Name ,
2183+ Name : entry .Name ,
21842184 CreationTimestamp : entry .CreatedTimestamp ,
21852185 LastSeenTimestamp : entry .LastSeenTimestamp ,
21862186 }
@@ -2376,28 +2376,28 @@ func (s *SignalClient) AddStickerPack(number string, packId string, packKey stri
23762376
23772377func (s * SignalClient ) ListContacts (number string ) ([]ListContactsResponse , error ) {
23782378 type SignalCliProfileResponse struct {
2379- LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"`
2380- GivenName string `json:"givenName"`
2381- FamilyName string `json:"familyName"`
2382- About string `json:"about"`
2383- HasAvatar bool `json:"hasAvatar"`
2379+ LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"`
2380+ GivenName string `json:"givenName"`
2381+ FamilyName string `json:"familyName"`
2382+ About string `json:"about"`
2383+ HasAvatar bool `json:"hasAvatar"`
23842384 }
23852385
23862386 type ListContactsSignlCliResponse struct {
2387- Number string `json:"number"`
2388- Uuid string `json:"uuid"`
2389- Name string `json:"name"`
2390- ProfileName string `json:"profileName"`
2391- Username string `json:"username"`
2392- Color string `json:"color"`
2393- Blocked bool `json:"blocked"`
2394- MessageExpiration string `json:"messageExpiration"`
2395- Note string `json:"note"`
2396- GivenName string `json:"givenName"`
2397- Profile SignalCliProfileResponse `json:"profile"`
2398- Nickname string `json:"nickName"`
2399- NickGivenName string `json:"nickGivenName"`
2400- NickFamilyName string `json:"nickFamilyName"`
2387+ Number string `json:"number"`
2388+ Uuid string `json:"uuid"`
2389+ Name string `json:"name"`
2390+ ProfileName string `json:"profileName"`
2391+ Username string `json:"username"`
2392+ Color string `json:"color"`
2393+ Blocked bool `json:"blocked"`
2394+ MessageExpiration string `json:"messageExpiration"`
2395+ Note string `json:"note"`
2396+ GivenName string `json:"givenName"`
2397+ Profile SignalCliProfileResponse `json:"profile"`
2398+ Nickname string `json:"nickName"`
2399+ NickGivenName string `json:"nickGivenName"`
2400+ NickFamilyName string `json:"nickFamilyName"`
24012401 }
24022402
24032403 resp := []ListContactsResponse {}
@@ -2439,8 +2439,8 @@ func (s *SignalClient) ListContacts(number string) ([]ListContactsResponse, erro
24392439 Color : value .Color ,
24402440 Blocked : value .Blocked ,
24412441 MessageExpiration : value .MessageExpiration ,
2442- Note : value .Note ,
2443- GivenName : value .GivenName ,
2442+ Note : value .Note ,
2443+ GivenName : value .GivenName ,
24442444 }
24452445 entry .Profile .About = value .Profile .About
24462446 entry .Profile .HasAvatar = value .Profile .HasAvatar
@@ -2456,7 +2456,7 @@ func (s *SignalClient) ListContacts(number string) ([]ListContactsResponse, erro
24562456 return resp , nil
24572457}
24582458
2459- func (s * SignalClient ) SetPin (number string , registrationLockPin string ) ( error ) {
2459+ func (s * SignalClient ) SetPin (number string , registrationLockPin string ) error {
24602460 if s .signalCliMode == JsonRpc {
24612461 type Request struct {
24622462 RegistrationLockPin string `json:"pin"`
@@ -2481,8 +2481,7 @@ func (s *SignalClient) SetPin(number string, registrationLockPin string) (error)
24812481 return nil
24822482}
24832483
2484-
2485- func (s * SignalClient ) RemovePin (number string ) (error ) {
2484+ func (s * SignalClient ) RemovePin (number string ) error {
24862485 if s .signalCliMode == JsonRpc {
24872486 jsonRpc2Client , err := s .getJsonRpc2Client ()
24882487 if err != nil {
0 commit comments