mirror of
https://github.com/mautrix/whatsapp.git
synced 2026-11-12 00:59:17 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e27c7abad |
2 changed files with 5 additions and 2 deletions
|
|
@ -193,7 +193,7 @@ func (wa *WhatsAppConnector) migrateToLIDDMs(ctx context.Context) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to get LID for PN portal %s: %w", key.ID, err)
|
||||
} else if lid.IsEmpty() {
|
||||
log.Warn().Stringer("pn", pnJID).Msg("No LID for PN portal")
|
||||
log.Debug().Stringer("pn", pnJID).Msg("No LID for PN portal")
|
||||
wa.unmigratedDMs.Add(key)
|
||||
missingLID++
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ package msgconv
|
|||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"image"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
|
@ -52,7 +53,9 @@ func (mc *MessageConverter) convertURLPreviewToBeeper(ctx context.Context, msg *
|
|||
if msg.ThumbnailDirectPath != nil {
|
||||
var err error
|
||||
thumbnailData, err = getClient(ctx).DownloadThumbnail(ctx, msg)
|
||||
if err != nil {
|
||||
if errors.Is(err, whatsmeow.ErrMediaDownloadFailedWith403) || errors.Is(err, whatsmeow.ErrMediaDownloadFailedWith404) || errors.Is(err, whatsmeow.ErrMediaDownloadFailedWith410) {
|
||||
zerolog.Ctx(ctx).Debug().Err(err).Msg("Failed to download thumbnail for link preview")
|
||||
} else if err != nil {
|
||||
zerolog.Ctx(ctx).Err(err).Msg("Failed to download thumbnail for link preview")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue