mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-03-14 02:40:14 +00:00
type cleanup, fix typo
This commit is contained in:
parent
6ec6e198d7
commit
5fcaa2ca2c
@ -214,6 +214,31 @@ type ContactProfile struct {
|
||||
LastUpdatedTimestamp int64 `json:"last_updated_timestamp"`
|
||||
}
|
||||
|
||||
type SignalCliProfileResponse struct {
|
||||
LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"`
|
||||
GivenName string `json:"givenName"`
|
||||
FamilyName string `json:"familyName"`
|
||||
About string `json:"about"`
|
||||
HasAvatar bool `json:"hasAvatar"`
|
||||
}
|
||||
|
||||
type ListContactsSignalCliResponse struct {
|
||||
Number string `json:"number"`
|
||||
Uuid string `json:"uuid"`
|
||||
Name string `json:"name"`
|
||||
ProfileName string `json:"profileName"`
|
||||
Username string `json:"username"`
|
||||
Color string `json:"color"`
|
||||
Blocked bool `json:"blocked"`
|
||||
MessageExpiration string `json:"messageExpiration"`
|
||||
Note string `json:"note"`
|
||||
GivenName string `json:"givenName"`
|
||||
Profile SignalCliProfileResponse `json:"profile"`
|
||||
Nickname string `json:"nickName"`
|
||||
NickGivenName string `json:"nickGivenName"`
|
||||
NickFamilyName string `json:"nickFamilyName"`
|
||||
}
|
||||
|
||||
type Nickname struct {
|
||||
Name string `json:"name"`
|
||||
GivenName string `json:"given_name"`
|
||||
@ -2601,29 +2626,6 @@ func (s *SignalClient) AddStickerPack(number string, packId string, packKey stri
|
||||
return err
|
||||
}
|
||||
}
|
||||
type SignalCliProfileResponse struct {
|
||||
LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"`
|
||||
GivenName string `json:"givenName"`
|
||||
FamilyName string `json:"familyName"`
|
||||
About string `json:"about"`
|
||||
HasAvatar bool `json:"hasAvatar"`
|
||||
}
|
||||
type ListContactsSignlCliResponse struct {
|
||||
Number string `json:"number"`
|
||||
Uuid string `json:"uuid"`
|
||||
Name string `json:"name"`
|
||||
ProfileName string `json:"profileName"`
|
||||
Username string `json:"username"`
|
||||
Color string `json:"color"`
|
||||
Blocked bool `json:"blocked"`
|
||||
MessageExpiration string `json:"messageExpiration"`
|
||||
Note string `json:"note"`
|
||||
GivenName string `json:"givenName"`
|
||||
Profile SignalCliProfileResponse `json:"profile"`
|
||||
Nickname string `json:"nickName"`
|
||||
NickGivenName string `json:"nickGivenName"`
|
||||
NickFamilyName string `json:"nickFamilyName"`
|
||||
}
|
||||
|
||||
func (s *SignalClient) ListContacts(number string, allRecipients bool) ([]ListContactsResponse, error) {
|
||||
resp := []ListContactsResponse{}
|
||||
@ -2655,7 +2657,7 @@ func (s *SignalClient) ListContacts(number string, allRecipients bool) ([]ListCo
|
||||
}
|
||||
}
|
||||
|
||||
var signalCliResp []ListContactsSignlCliResponse
|
||||
var signalCliResp []ListContactsSignalCliResponse
|
||||
err = json.Unmarshal([]byte(rawData), &signalCliResp)
|
||||
if err != nil {
|
||||
log.Error("Couldn't list contacts", err.Error())
|
||||
@ -2721,7 +2723,7 @@ func (s *SignalClient) ListContact(number string, uuid string, allRecipients boo
|
||||
}
|
||||
}
|
||||
|
||||
var signalCliResp []ListContactsSignlCliResponse
|
||||
var signalCliResp []ListContactsSignalCliResponse
|
||||
err = json.Unmarshal([]byte(rawData), &signalCliResp)
|
||||
if err != nil {
|
||||
log.Error("Couldn't list contacts", err.Error())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user