Check errors of GetProfilePicThumb
When a request for GetProfilePicThumb fails, WhatsApp sends an JSON object containing a status field: `{"status":404}`. In my tests, it did send the codes 401 and 404 which might correspond to the HTTP status codes. At least, we don't have data to update the avatar and should stop doing so.
This commit is contained in:
@ -95,6 +95,8 @@ func (ext *ExtendedConn) GetGroupMetaData(jid string) (*GroupInfo, error) {
|
||||
type ProfilePicInfo struct {
|
||||
URL string `json:"eurl"`
|
||||
Tag string `json:"tag"`
|
||||
|
||||
Status int16 `json:"status"`
|
||||
}
|
||||
|
||||
func (ppi *ProfilePicInfo) Download() (io.ReadCloser, error) {
|
||||
|
Reference in New Issue
Block a user