Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Match MSC behaviour for threads when disabled (thread-aware mode) (#8476
Browse files Browse the repository at this point in the history
)
  • Loading branch information
t3chguy authored May 3, 2022
1 parent 2141b12 commit dc9ec85
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/utils/Reply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,17 @@ export function makeReplyMixIn(ev?: MatrixEvent): IEventRelation {
},
};

if (SettingsStore.getValue("feature_thread") && ev.threadRootId) {
mixin.is_falling_back = false;
if (ev.threadRootId) {
if (SettingsStore.getValue("feature_thread")) {
mixin.is_falling_back = false;
} else {
// Clients that do not offer a threading UI should behave as follows when replying, for best interaction
// with those that do. They should set the m.in_reply_to part as usual, and then add on
// "rel_type": "m.thread" and "event_id": "$thread_root", copying $thread_root from the replied-to event.
const relation = ev.getRelation();
mixin.rel_type = relation.rel_type;
mixin.event_id = relation.event_id;
}
}

return mixin;
Expand Down

0 comments on commit dc9ec85

Please sign in to comment.