You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-09-01 21:21:58 +03:00
Add higher level keys to fake receipts
This commit is contained in:
@@ -13,7 +13,11 @@ var ContentRepo = require("../content-repo");
|
||||
function synthesizeReceipt(userId, event, receiptType) {
|
||||
// This is really ugly because JS has no way to express an object literal
|
||||
// where the name of a key comes from an expression
|
||||
var fakeReceipt = {content: {}};
|
||||
var fakeReceipt = {
|
||||
content: {},
|
||||
type: "m.receipt",
|
||||
room_id: event.getRoomId()
|
||||
};
|
||||
fakeReceipt.content[event.getId()] = {};
|
||||
fakeReceipt.content[event.getId()][receiptType] = {};
|
||||
fakeReceipt.content[event.getId()][receiptType][userId] = {
|
||||
|
Reference in New Issue
Block a user