mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-19 14:27:29 -06:00
fiddle de deee
This commit is contained in:
parent
2497a4d596
commit
1092bc4f54
2 changed files with 12 additions and 16 deletions
|
|
@ -146,14 +146,6 @@ func (p *Processor) Create(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only store ContentWarningText if the parsed
|
|
||||||
// result is different from the given SpoilerText,
|
|
||||||
// otherwise skip to avoid duplicating db columns.
|
|
||||||
var contentWarningText string
|
|
||||||
if content.ContentWarning != form.SpoilerText {
|
|
||||||
contentWarningText = form.SpoilerText
|
|
||||||
}
|
|
||||||
|
|
||||||
status := >smodel.Status{
|
status := >smodel.Status{
|
||||||
ID: statusID,
|
ID: statusID,
|
||||||
URI: accountURIs.StatusesURI + "/" + statusID,
|
URI: accountURIs.StatusesURI + "/" + statusID,
|
||||||
|
|
@ -171,11 +163,10 @@ func (p *Processor) Create(
|
||||||
Language: content.Language,
|
Language: content.Language,
|
||||||
|
|
||||||
// Set formatted status content.
|
// Set formatted status content.
|
||||||
Content: content.Content,
|
Content: content.Content,
|
||||||
ContentWarning: content.ContentWarning,
|
ContentWarning: content.ContentWarning,
|
||||||
Text: form.Status, // raw
|
Text: form.Status, // raw
|
||||||
ContentWarningText: contentWarningText, // raw
|
ContentType: contentType,
|
||||||
ContentType: contentType,
|
|
||||||
|
|
||||||
// Set gathered mentions.
|
// Set gathered mentions.
|
||||||
MentionIDs: content.MentionIDs,
|
MentionIDs: content.MentionIDs,
|
||||||
|
|
@ -198,6 +189,13 @@ func (p *Processor) Create(
|
||||||
PendingApproval: util.Ptr(false),
|
PendingApproval: util.Ptr(false),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only store ContentWarningText if the parsed
|
||||||
|
// result is different from the given SpoilerText,
|
||||||
|
// otherwise skip to avoid duplicating db columns.
|
||||||
|
if content.ContentWarning != form.SpoilerText {
|
||||||
|
status.ContentWarningText = form.SpoilerText
|
||||||
|
}
|
||||||
|
|
||||||
if backfill {
|
if backfill {
|
||||||
// Ensure backfilled status contains no
|
// Ensure backfilled status contains no
|
||||||
// mentions to anyone other than author.
|
// mentions to anyone other than author.
|
||||||
|
|
|
||||||
|
|
@ -312,11 +312,9 @@ func (p *Processor) Edit(
|
||||||
// Only store ContentWarningText if the parsed
|
// Only store ContentWarningText if the parsed
|
||||||
// result is different from the given SpoilerText,
|
// result is different from the given SpoilerText,
|
||||||
// otherwise skip to avoid duplicating db columns.
|
// otherwise skip to avoid duplicating db columns.
|
||||||
var contentWarningText string
|
|
||||||
if content.ContentWarning != form.SpoilerText {
|
if content.ContentWarning != form.SpoilerText {
|
||||||
contentWarningText = form.SpoilerText
|
status.ContentWarningText = form.SpoilerText
|
||||||
}
|
}
|
||||||
status.ContentWarningText = contentWarningText // raw
|
|
||||||
|
|
||||||
if poll != nil {
|
if poll != nil {
|
||||||
// Set relevent fields for latest with poll.
|
// Set relevent fields for latest with poll.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue