diff --git a/portal.go b/portal.go index 45ef236..10a9803 100644 --- a/portal.go +++ b/portal.go @@ -258,6 +258,12 @@ func (portal *Portal) UpdateAvatar(user *User, avatar *whatsappExt.ProfilePicInf } } + if avatar.Status != 0 { + // 401: ??? + // 404: ??? + return false + } + if portal.Avatar == avatar.Tag { return false } diff --git a/whatsapp-ext/whatsapp.go b/whatsapp-ext/whatsapp.go index 2dfe558..9f38345 100644 --- a/whatsapp-ext/whatsapp.go +++ b/whatsapp-ext/whatsapp.go @@ -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) {