Properly stop PluralKit users typing after sending

This commit is contained in:
Cadence Ember
2026-02-04 00:59:23 +13:00
parent b52b2de205
commit f5d50fc14e

View File

@@ -69,7 +69,8 @@ async function sendMessage(message, channel, guild, row) {
const eventIDs = []
if (events.length) {
db.prepare("INSERT OR IGNORE INTO message_room (message_id, historical_room_index) VALUES (?, ?)").run(message.id, historicalRoomIndex)
if (senderMxid) api.sendTyping(roomID, false, senderMxid).catch(() => {})
const typingMxid = from("sim").join("sim_member", "mxid").where({user_id: message.author.id, room_id: roomID}).pluck("mxid").get()
if (typingMxid) api.sendTyping(roomID, false, typingMxid).catch(() => {})
}
for (const event of events) {
const part = event === events[0] ? 0 : 1