Don't form continuations from thread roots (#8166)
* Don't form continuations from thread roots * Only apply the continuation break in the main timeline
This commit is contained in:
parent
6c69f3e3b6
commit
1e060fed84
5 changed files with 62 additions and 11 deletions
|
@ -191,7 +191,20 @@ export function mkEvent(opts: MakeEventProps): MatrixEvent {
|
|||
].indexOf(opts.type) !== -1) {
|
||||
event.state_key = "";
|
||||
}
|
||||
return opts.event ? new MatrixEvent(event) : event as unknown as MatrixEvent;
|
||||
|
||||
const mxEvent = opts.event ? new MatrixEvent(event) : event as unknown as MatrixEvent;
|
||||
if (!mxEvent.sender && opts.user && opts.room) {
|
||||
mxEvent.sender = {
|
||||
userId: opts.user,
|
||||
membership: "join",
|
||||
name: opts.user,
|
||||
rawDisplayName: opts.user,
|
||||
roomId: opts.room,
|
||||
getAvatarUrl: () => {},
|
||||
getMxcAvatarUrl: () => {},
|
||||
} as unknown as RoomMember;
|
||||
}
|
||||
return mxEvent;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue