Lots of fixes to "media threads"
This commit is contained in:
parent
fe081edc62
commit
8bcceafcff
23 changed files with 867 additions and 333 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import util from "../../plugins/utils";
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
|
|
@ -5,8 +6,12 @@ export default {
|
|||
return !this.incoming && this.event.getContent().msgtype == "m.text";
|
||||
},
|
||||
isDownloadable() {
|
||||
if ((this.event.isThreadRoot || this.event.isMxThread) && this.timelineSet) {
|
||||
const children = this.timelineSet.relations.getAllChildEventsForEvent(this.event.getId()).filter(e => util.downloadableTypes().includes(e.getContent().msgtype));
|
||||
return children.length > 0;
|
||||
}
|
||||
const msgtype = this.event.getContent().msgtype;
|
||||
return ['m.video','m.audio','m.image','m.file'].includes(msgtype);
|
||||
return util.downloadableTypes().includes(msgtype);
|
||||
},
|
||||
isRedactable() {
|
||||
const room = this.$matrix.matrixClient.getRoom(this.event.getRoomId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue