fix group msg

This commit is contained in:
Rogee
2024-09-03 09:43:21 +08:00
parent ba16785b43
commit df2ca18f19
5 changed files with 138 additions and 28 deletions

View File

@@ -87,11 +87,11 @@ func (t *TClient) Channel(ctx context.Context, channel *tg.Channel, cfg *DBChann
logger.Error("save document failed", zap.Error(err))
return err
}
channelMessage.WithDocument(data)
channelMessage.WithDocument(doc.GetID(), data)
}
case *tg.MessageMediaWebPage:
if page, ok := mediaClass.(*tg.MessageMediaWebPage).GetWebpage().(*tg.WebPage); ok {
channelMessage.WithWebPage(page.Title, page.URL)
channelMessage.WithWebPage(page.GetID(), page.Title, page.URL)
} else {
logger.Warn("web_page", zap.String("url", mediaClass.(*tg.MessageMediaWebPage).GetWebpage().String()))
}