mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 20:32:50 +02:00
d->m: preserve unknown messages when syncing pins
This commit is contained in:
parent
2a6284968f
commit
8d4d505ab9
3 changed files with 67 additions and 5 deletions
|
@ -33,9 +33,10 @@ async function updatePins(channelID, roomID, convertedTimestamp) {
|
|||
}
|
||||
throw e
|
||||
}
|
||||
const pinned = pinsToList.pinsToList(discordPins)
|
||||
|
||||
const kstate = await ks.roomToKState(roomID)
|
||||
const pinned = pinsToList.pinsToList(discordPins, kstate)
|
||||
|
||||
const diff = ks.diffKState(kstate, {"m.room.pinned_events/": {pinned}})
|
||||
await ks.applyKStateDiffToRoom(roomID, diff)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue