Force Matrix m.notices to be unchanged events

This commit is contained in:
Cadence Ember
2026-01-18 02:53:39 +13:00
parent 92a60955bc
commit 014a87ed9e
5 changed files with 45 additions and 44 deletions
+1 -8
View File
@@ -4,7 +4,7 @@ const DiscordTypes = require("discord-api-types/v10")
const tryToCatch = require("try-to-catch")
const {router, test} = require("../../../test/web")
const {MatrixServerError} = require("../../matrix/mreq")
const {_getPosition, _filterTo} = require("./guild")
const {_getPosition} = require("./guild")
let nonce
@@ -394,10 +394,3 @@ test("position sorting: sorts like discord does", t => {
const sortedChannelIDs = [...channels.values()].sort((a, b) => _getPosition(a, channels) - _getPosition(b, channels)).map(c => c.id)
t.deepEqual(sortedChannelIDs, ["first", "thread", "second", "voice", "category", "category-first", "category-second", "category-second-thread"])
})
test("filterTo: works", t => {
const fruit = ["apple", "banana", "apricot"]
const rest = _filterTo(fruit, f => f[0] === "b")
t.deepEqual(fruit, ["banana"])
t.deepEqual(rest, ["apple", "apricot"])
})