Remove unhelpful guard preventing d->m pin syncing

This commit is contained in:
Cadence Ember
2025-01-08 09:37:30 +13:00
parent fb18c0fe0b
commit 0c1b4c5e8e

View File

@@ -25,11 +25,9 @@ function convertTimestamp(timestamp) {
async function updatePins(channelID, roomID, convertedTimestamp) {
const pins = await discord.snow.channel.getChannelPinnedMessages(channelID)
const eventIDs = pinsToList.pinsToList(pins)
if (pins.length === eventIDs.length || eventIDs.length) {
await api.sendState(roomID, "m.room.pinned_events", "", {
pinned: eventIDs
})
}
await api.sendState(roomID, "m.room.pinned_events", "", {
pinned: eventIDs
})
db.prepare("UPDATE channel_room SET last_bridged_pin_timestamp = ? WHERE channel_id = ?").run(convertedTimestamp || 0, channelID)
}