prepareStatus: created_at_parsed.
This commit is contained in:
parent
59647798b9
commit
aeb8868b82
2 changed files with 13 additions and 0 deletions
|
@ -115,11 +115,15 @@ export const findMaxId = (...args) => {
|
|||
}
|
||||
|
||||
export const prepareStatus = (status) => {
|
||||
// Parse nsfw tags
|
||||
if (status.nsfw === undefined) {
|
||||
const nsfwRegex = /#nsfw/i
|
||||
status.nsfw = !!status.text.match(nsfwRegex)
|
||||
}
|
||||
|
||||
// Set created_at_parsed to initial value
|
||||
status.created_at_parsed = status.created_at
|
||||
|
||||
return status
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue