Add fields_text for tooltip

This commit is contained in:
kPherox 2020-02-19 20:57:58 +09:00
parent bfdf7c876c
commit da55b0d435
No known key found for this signature in database
GPG key ID: C04751C2BFA2F62D
2 changed files with 19 additions and 0 deletions

View file

@ -53,6 +53,12 @@ export const parseUser = (data) => {
value: addEmojis(field.value, data.emojis)
}
})
output.fields_text = data.fields.map(field => {
return {
name: field.name.replace(/<[^>]*>/g, ''),
value: field.value.replace(/<[^>]*>/g, '')
}
})
// Utilize avatar_static for gif avatars?
output.profile_image_url = data.avatar