fix: canonical user
This commit is contained in:
parent
2e3049d8e2
commit
bb666f7353
|
@ -27,9 +27,14 @@ export default class Chat extends Model {
|
|||
return thing;
|
||||
}
|
||||
// eslint-disable-next-line camelcase
|
||||
const {data: {display_name}} = await fetch(`https://old.reddit.com${rendered}/about.json`)
|
||||
const {data} = await fetch(`https://old.reddit.com${rendered}/about.json`)
|
||||
.then((response) => response.json());
|
||||
return this.create({name: renderChannel({...channel, name: display_name})});
|
||||
return this.create({
|
||||
name: renderChannel({
|
||||
...channel,
|
||||
name: data.display_name || data.name,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user