Remove unhelpful guard preventing d->m pin syncing
This commit is contained in:
@@ -25,11 +25,9 @@ function convertTimestamp(timestamp) {
|
|||||||
async function updatePins(channelID, roomID, convertedTimestamp) {
|
async function updatePins(channelID, roomID, convertedTimestamp) {
|
||||||
const pins = await discord.snow.channel.getChannelPinnedMessages(channelID)
|
const pins = await discord.snow.channel.getChannelPinnedMessages(channelID)
|
||||||
const eventIDs = pinsToList.pinsToList(pins)
|
const eventIDs = pinsToList.pinsToList(pins)
|
||||||
if (pins.length === eventIDs.length || eventIDs.length) {
|
await api.sendState(roomID, "m.room.pinned_events", "", {
|
||||||
await api.sendState(roomID, "m.room.pinned_events", "", {
|
pinned: eventIDs
|
||||||
pinned: eventIDs
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
db.prepare("UPDATE channel_room SET last_bridged_pin_timestamp = ? WHERE channel_id = ?").run(convertedTimestamp || 0, channelID)
|
db.prepare("UPDATE channel_room SET last_bridged_pin_timestamp = ? WHERE channel_id = ?").run(convertedTimestamp || 0, channelID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user