feat: sync AI compose and ChatBot features
This commit is contained in:
parent
35e5d38f4d
commit
b7269b135f
75 changed files with 5426 additions and 123 deletions
|
|
@ -111,6 +111,11 @@ func sliceUTF16(units []uint16, offset, length int) string {
|
|||
//
|
||||
// 未启用预览或 URL 不可规范化返回 nil(发送降级为无预览,不报错)。
|
||||
func (r *Router) webPagePendingOrCachedMedia(ctx context.Context, rawURL string, invertMedia, forceLarge, forceSmall bool) *domain.MessageMedia {
|
||||
if page, ok := r.resolveAIComposeStyleWebPage(ctx, rawURL); ok {
|
||||
page.ForceLargeMedia = forceLarge
|
||||
page.ForceSmallMedia = forceSmall
|
||||
return &domain.MessageMedia{Kind: domain.MessageMediaKindWebPage, InvertMedia: invertMedia, WebPage: &page}
|
||||
}
|
||||
if r.deps.Files == nil || !r.deps.Files.WebPagePreviewEnabled() {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue