Don't require url/asset for snippet creation from discord.

This commit is contained in:
Asaf Gartner 2024-03-04 21:19:56 +02:00
parent 444f43a195
commit cd36eb44eb
1 changed files with 33 additions and 34 deletions

View File

@ -834,7 +834,7 @@ func HandleSnippetForInternedMessage(ctx context.Context, dbConn db.ConnOrTx, in
if shouldCreate {
// Get an asset ID or URL to make a snippet from
assetId, url, err := getSnippetAssetOrUrl(ctx, tx, &interned.Message)
if assetId != nil || url != nil {
contentMarkdown := interned.MessageContent.LastContent
contentHTML := parsing.ParseMarkdown(contentMarkdown, parsing.DiscordMarkdown)
@ -873,7 +873,6 @@ func HandleSnippetForInternedMessage(ctx context.Context, dbConn db.ConnOrTx, in
}
}
}
}
if existingSnippet != nil {
// Update tags