fix: AppES PD alert

This happened because the return signature of get_app_icon was changed
so that the MIME type can be returned when the uploaded or default icon
is being used as a fallback. AppES was not updated to account for this
change.
This commit is contained in:
KernelDeimos
2024-12-20 13:56:32 -05:00
parent a504c6ba2a
commit f14e1fefcf

View File

@@ -289,13 +289,13 @@ class AppES extends BaseES {
console.log('GOING TO');
const svc_appIcon = this.context.get('services').get('app-icon');
try {
const stream = await svc_appIcon.get_icon_stream({
const { stream, mime } = await svc_appIcon.get_icon_stream({
app_uid: await entity.get('uid'),
size: icon_size,
});
if ( ! stream ) throw Error('no stream');
const buffer = await stream_to_buffer(stream);
const data_url = `data:image/png;base64,${buffer.toString('base64')}`;
const data_url = `data:${mime};base64,${buffer.toString('base64')}`;
await entity.set('icon', data_url);
console.log('DID IT')
} catch (e) {