Merge pull request #4091 from h3poteto/feat/read-privacy-sensitive
Read default value for sensitive and nsfw from API response
This commit is contained in:
commit
e9691209ba
|
@ -207,8 +207,14 @@ export default defineComponent({
|
||||||
const c = generator(s.sns, s.baseURL, a.accessToken, userAgent.value)
|
const c = generator(s.sns, s.baseURL, a.accessToken, userAgent.value)
|
||||||
client.value = c
|
client.value = c
|
||||||
|
|
||||||
const res = await c.getInstanceCustomEmojis()
|
const credentials = await c.verifyAccountCredentials()
|
||||||
const customEmojis = res.data
|
if (credentials.data.source) {
|
||||||
|
visibility.value = credentials.data.source.privacy
|
||||||
|
nsfw.value = credentials.data.source.sensitive
|
||||||
|
}
|
||||||
|
|
||||||
|
const emojis = await c.getInstanceCustomEmojis()
|
||||||
|
const customEmojis = emojis.data
|
||||||
.map(emoji => {
|
.map(emoji => {
|
||||||
return {
|
return {
|
||||||
name: `:${emoji.shortcode}:`,
|
name: `:${emoji.shortcode}:`,
|
||||||
|
|
Loading…
Reference in New Issue