@@ -190,38 +190,38 @@ type ListInstalledStickerPacksResponse struct {
190
190
}
191
191
192
192
type 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"`
198
198
}
199
199
200
200
type Nickname struct {
201
- Name string `json:"name"`
202
- GivenName string `json:"given_name"`
201
+ Name string `json:"name"`
202
+ GivenName string `json:"given_name"`
203
203
FamilyName string `json:"family_name"`
204
204
}
205
205
206
206
type 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"`
219
219
}
220
220
221
221
type 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"`
225
225
}
226
226
227
227
func cleanupTmpFiles (paths []string ) {
@@ -1311,7 +1311,7 @@ func (s *SignalClient) GetGroupAvatar(number string, groupId string) ([]byte, er
1311
1311
rawData , err = jsonRpc2Client .getRaw ("getAvatar" , & number , request )
1312
1312
if err != nil {
1313
1313
if err .Error () == "Could not find avatar" {
1314
- return []byte {},& NotFoundError {Description : "No avatar found." }
1314
+ return []byte {}, & NotFoundError {Description : "No avatar found." }
1315
1315
}
1316
1316
return []byte {}, err
1317
1317
}
@@ -1480,7 +1480,7 @@ func (s *SignalClient) GetAccounts() ([]string, error) {
1480
1480
func (s * SignalClient ) GetAttachments () ([]string , error ) {
1481
1481
files := []string {}
1482
1482
1483
- attachmentsPath := s .signalCliConfig + "/attachments/"
1483
+ attachmentsPath := s .signalCliConfig + "/attachments/"
1484
1484
if _ , err := os .Stat (attachmentsPath ); ! os .IsNotExist (err ) {
1485
1485
err = filepath .Walk (attachmentsPath , func (path string , info os.FileInfo , err error ) error {
1486
1486
if info .IsDir () {
@@ -2149,10 +2149,10 @@ func (s *SignalClient) ListDevices(number string) ([]ListDevicesResponse, error)
2149
2149
resp := []ListDevicesResponse {}
2150
2150
2151
2151
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"`
2156
2156
}
2157
2157
2158
2158
var err error
@@ -2180,7 +2180,7 @@ func (s *SignalClient) ListDevices(number string) ([]ListDevicesResponse, error)
2180
2180
2181
2181
for _ , entry := range signalCliResp {
2182
2182
deviceEntry := ListDevicesResponse {
2183
- Name : entry .Name ,
2183
+ Name : entry .Name ,
2184
2184
CreationTimestamp : entry .CreatedTimestamp ,
2185
2185
LastSeenTimestamp : entry .LastSeenTimestamp ,
2186
2186
}
@@ -2376,28 +2376,28 @@ func (s *SignalClient) AddStickerPack(number string, packId string, packKey stri
2376
2376
2377
2377
func (s * SignalClient ) ListContacts (number string ) ([]ListContactsResponse , error ) {
2378
2378
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"`
2384
2384
}
2385
2385
2386
2386
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"`
2401
2401
}
2402
2402
2403
2403
resp := []ListContactsResponse {}
@@ -2439,8 +2439,8 @@ func (s *SignalClient) ListContacts(number string) ([]ListContactsResponse, erro
2439
2439
Color : value .Color ,
2440
2440
Blocked : value .Blocked ,
2441
2441
MessageExpiration : value .MessageExpiration ,
2442
- Note : value .Note ,
2443
- GivenName : value .GivenName ,
2442
+ Note : value .Note ,
2443
+ GivenName : value .GivenName ,
2444
2444
}
2445
2445
entry .Profile .About = value .Profile .About
2446
2446
entry .Profile .HasAvatar = value .Profile .HasAvatar
@@ -2456,7 +2456,7 @@ func (s *SignalClient) ListContacts(number string) ([]ListContactsResponse, erro
2456
2456
return resp , nil
2457
2457
}
2458
2458
2459
- func (s * SignalClient ) SetPin (number string , registrationLockPin string ) ( error ) {
2459
+ func (s * SignalClient ) SetPin (number string , registrationLockPin string ) error {
2460
2460
if s .signalCliMode == JsonRpc {
2461
2461
type Request struct {
2462
2462
RegistrationLockPin string `json:"pin"`
@@ -2481,8 +2481,7 @@ func (s *SignalClient) SetPin(number string, registrationLockPin string) (error)
2481
2481
return nil
2482
2482
}
2483
2483
2484
-
2485
- func (s * SignalClient ) RemovePin (number string ) (error ) {
2484
+ func (s * SignalClient ) RemovePin (number string ) error {
2486
2485
if s .signalCliMode == JsonRpc {
2487
2486
jsonRpc2Client , err := s .getJsonRpc2Client ()
2488
2487
if err != nil {
0 commit comments