You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Add await
This commit is contained in:
@@ -213,9 +213,9 @@ export default class HTMLExporter extends Exporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected getEventTile(mxEv: MatrixEvent, continuation: boolean, mediaSrc?: string) {
|
protected async getEventTile(mxEv: MatrixEvent, continuation: boolean, mediaSrc?: string) {
|
||||||
const hasAvatar = this.hasAvatar(mxEv);
|
const hasAvatar = this.hasAvatar(mxEv);
|
||||||
if (hasAvatar) this.saveAvatarIfNeeded(mxEv);
|
if (hasAvatar) await this.saveAvatarIfNeeded(mxEv);
|
||||||
|
|
||||||
return <li className="mx_Export_EventWrapper" id={mxEv.getId()}>
|
return <li className="mx_Export_EventWrapper" id={mxEv.getId()}>
|
||||||
<EventTile
|
<EventTile
|
||||||
@@ -252,9 +252,9 @@ export default class HTMLExporter extends Exporter {
|
|||||||
if (mxEv.getType() === attachmentTypes[0] || attachmentTypes.includes(mxEv.getContent().msgtype)) {
|
if (mxEv.getType() === attachmentTypes[0] || attachmentTypes.includes(mxEv.getContent().msgtype)) {
|
||||||
const blob = await this.getMediaBlob(mxEv);
|
const blob = await this.getMediaBlob(mxEv);
|
||||||
const filePath = this.getFilePath(mxEv);
|
const filePath = this.getFilePath(mxEv);
|
||||||
eventTile = this.getEventTile(mxEv, joined, filePath);
|
eventTile = await this.getEventTile(mxEv, joined, filePath);
|
||||||
this.zip.file(filePath, blob);
|
this.zip.file(filePath, blob);
|
||||||
} else eventTile = this.getEventTile(mxEv, joined);
|
} else eventTile = await this.getEventTile(mxEv, joined);
|
||||||
|
|
||||||
return renderToStaticMarkup(eventTile);
|
return renderToStaticMarkup(eventTile);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user