mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Prefer relations from encrypted content
This commit is contained in:
parent
5a0bc55e54
commit
1207203b00
@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
import {BaseEventEntry} from "./BaseEventEntry.js";
|
||||
import {getPrevContentFromStateEvent, isRedacted} from "../../common.js";
|
||||
import {getRelatedEventId} from "../relations.js";
|
||||
import {getRelationFromContent, getRelatedEventId} from "../relations.js";
|
||||
|
||||
export class EventEntry extends BaseEventEntry {
|
||||
constructor(eventEntry, fragmentIdComparer) {
|
||||
@ -139,6 +139,12 @@ export class EventEntry extends BaseEventEntry {
|
||||
get annotations() {
|
||||
return this._eventEntry.annotations;
|
||||
}
|
||||
|
||||
get relation() {
|
||||
const originalContent = this._eventEntry.event.content;
|
||||
const originalRelation = originalContent && getRelationFromContent(originalContent);
|
||||
return originalRelation || getRelationFromContent(this.content);
|
||||
}
|
||||
}
|
||||
|
||||
import {withTextBody, withContent, createEvent} from "../../../../mocks/event.js";
|
||||
|
Loading…
Reference in New Issue
Block a user