mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Match MSC behaviour for threads when disabled (thread-aware mode) (#8476)
This commit is contained in:
parent
2141b122f9
commit
dc9ec8526c
1 changed files with 11 additions and 2 deletions
|
@ -152,8 +152,17 @@ export function makeReplyMixIn(ev?: MatrixEvent): IEventRelation {
|
|||
},
|
||||
};
|
||||
|
||||
if (SettingsStore.getValue("feature_thread") && ev.threadRootId) {
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue