Use updates stable relations from js-sdk (#8715)
* Use updates stable relations from js-sdk * Relations is now accessible on the Room instead * Reuse more existing code and ditch confusing `isThreadRelation` * Fix last usage of removed `isThreadRelation` * Update tests to match removal of isThreadRelation * Tweak method naming to closer match spec * Fix missing method name change
This commit is contained in:
parent
56b0b79fb7
commit
21d0aaf524
8 changed files with 26 additions and 54 deletions
|
@ -189,7 +189,7 @@ const ReplyInThreadButton = ({ mxEvent }: IReplyInThreadButton) => {
|
|||
action: Action.ViewUserSettings,
|
||||
initialTabId: UserTab.Labs,
|
||||
});
|
||||
} else if (mxEvent.isThreadRelation) {
|
||||
} else if (mxEvent.getThread() && !mxEvent.isThreadRoot) {
|
||||
showThread({
|
||||
rootEvent: mxEvent.getThread().rootEvent,
|
||||
initialEvent: mxEvent,
|
||||
|
|
|
@ -285,8 +285,8 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
|
|||
let shouldReact = true;
|
||||
const lastMessage = events[i];
|
||||
const userId = MatrixClientPeg.get().getUserId();
|
||||
const messageReactions = this.props.room.getUnfilteredTimelineSet()
|
||||
.getRelationsForEvent(lastMessage.getId(), RelationType.Annotation, EventType.Reaction);
|
||||
const messageReactions = this.props.room.relations
|
||||
.getChildEventsForEvent(lastMessage.getId(), RelationType.Annotation, EventType.Reaction);
|
||||
|
||||
// if we have already sent this reaction, don't redact but don't re-send
|
||||
if (messageReactions) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue