mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 17:46:15 -06:00
fix status source test
This commit is contained in:
parent
44b779d8af
commit
f0f3bc52dc
3 changed files with 7 additions and 2 deletions
|
|
@ -91,7 +91,7 @@ func (suite *StatusSourceTestSuite) TestGetSource() {
|
||||||
|
|
||||||
suite.Equal(`{
|
suite.Equal(`{
|
||||||
"id": "01F8MHAMCHF6Y650WCRSCP4WMY",
|
"id": "01F8MHAMCHF6Y650WCRSCP4WMY",
|
||||||
"text": "**STATUS EDITS ARE NOT CURRENTLY SUPPORTED IN GOTOSOCIAL (coming in 2024)**\nYou can review the original text of your status below, but you will not be able to submit this edit.\n\n---\n\nhello everyone!",
|
"text": "hello everyone!",
|
||||||
"spoiler_text": "introduction post"
|
"spoiler_text": "introduction post"
|
||||||
}`, dst.String())
|
}`, dst.String())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,11 @@ func (p *Processor) processContent(
|
||||||
poll.Options = status.PollOptions
|
poll.Options = status.PollOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We may have received multiple copies of the same emoji, deduplicate these first.
|
||||||
|
status.Emojis = xslices.DeduplicateFunc(status.Emojis, func(e *gtsmodel.Emoji) string {
|
||||||
|
return e.ID
|
||||||
|
})
|
||||||
|
|
||||||
// Gather up the IDs of mentions from parsed content.
|
// Gather up the IDs of mentions from parsed content.
|
||||||
status.MentionIDs = xslices.Gather(nil, status.Mentions,
|
status.MentionIDs = xslices.Gather(nil, status.Mentions,
|
||||||
func(m *gtsmodel.Mention) string {
|
func(m *gtsmodel.Mention) string {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ func (p *Processor) Create(
|
||||||
return nil, errWithCode
|
return nil, errWithCode
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure account populated; we'll need settings.
|
// Ensure account populated; we'll need their settings.
|
||||||
if err := p.state.DB.PopulateAccount(ctx, requester); err != nil {
|
if err := p.state.DB.PopulateAccount(ctx, requester); err != nil {
|
||||||
log.Errorf(ctx, "error(s) populating account, will continue: %s", err)
|
log.Errorf(ctx, "error(s) populating account, will continue: %s", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue