mirror of
https://github.com/mautrix/whatsapp.git
synced 2026-11-13 01:29:18 -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 {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to get LID for PN portal %s: %w", key.ID, err)
|
return fmt.Errorf("failed to get LID for PN portal %s: %w", key.ID, err)
|
||||||
} else if lid.IsEmpty() {
|
} 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)
|
wa.unmigratedDMs.Add(key)
|
||||||
missingLID++
|
missingLID++
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ package msgconv
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"image"
|
"image"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
@ -52,7 +53,9 @@ func (mc *MessageConverter) convertURLPreviewToBeeper(ctx context.Context, msg *
|
||||||
if msg.ThumbnailDirectPath != nil {
|
if msg.ThumbnailDirectPath != nil {
|
||||||
var err error
|
var err error
|
||||||
thumbnailData, err = getClient(ctx).DownloadThumbnail(ctx, msg)
|
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")
|
zerolog.Ctx(ctx).Err(err).Msg("Failed to download thumbnail for link preview")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue