1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

Switch to using stable values for threads (#8019)

This commit is contained in:
Germain
2022-03-11 09:04:22 +00:00
committed by GitHub
parent d38a1fa201
commit 21d3cb08a9
12 changed files with 49 additions and 47 deletions

View File

@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { MatrixClient, MatrixEvent, RelationType, Room } from "matrix-js-sdk/src/matrix";
import { MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
import { Thread } from "matrix-js-sdk/src/models/thread";
import { mkMessage, MessageEventProps } from "./test-utils";
@@ -25,7 +25,7 @@ export const makeThreadEvent = ({ rootEventId, replyToEventId, ...props }: Messa
...props,
relatesTo: {
event_id: rootEventId,
rel_type: RelationType.Thread,
rel_type: "m.thread",
['m.in_reply_to']: {
event_id: replyToEventId,
},
@@ -79,7 +79,7 @@ export const makeThreadEvents = ({
rootEvent.setUnsigned({
"m.relations": {
[RelationType.Thread]: {
"m.thread": {
latest_event: events[events.length - 1],
count: length,
current_user_participated: [...participantUserIds, authorId].includes(currentUserId),