Remove unhelpful guard preventing d->m pin syncing
This commit is contained in:
parent
fb18c0fe0b
commit
0c1b4c5e8e
1 changed files with 3 additions and 5 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue