Compare commits
No commits in common. "7712bc34a6081a62cd06e2b046f3ba8869c44aa7" and "97ab77a0608adfa0e4b3f490b11c7717273873f9" have entirely different histories.
7712bc34a6
...
97ab77a060
3 changed files with 4 additions and 35 deletions
|
@ -63,8 +63,9 @@ async function channelToKState(channel, guild) {
|
||||||
assert.ok(typeof spaceID === "string")
|
assert.ok(typeof spaceID === "string")
|
||||||
|
|
||||||
const row = db.prepare("SELECT nick, custom_avatar FROM channel_room WHERE channel_id = ?").get(channel.id)
|
const row = db.prepare("SELECT nick, custom_avatar FROM channel_room WHERE channel_id = ?").get(channel.id)
|
||||||
const customName = row?.nick
|
assert(row)
|
||||||
const customAvatar = row?.custom_avatar
|
const customName = row.nick
|
||||||
|
const customAvatar = row.custom_avatar
|
||||||
const [convertedName, convertedTopic] = convertNameAndTopic(channel, guild, customName)
|
const [convertedName, convertedTopic] = convertNameAndTopic(channel, guild, customName)
|
||||||
|
|
||||||
const avatarEventContent = {}
|
const avatarEventContent = {}
|
||||||
|
|
|
@ -27,31 +27,3 @@ test("event2message: janky test", t => {
|
||||||
}]
|
}]
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
test("event2message: long messages are split", t => {
|
|
||||||
t.deepEqual(
|
|
||||||
eventToMessage({
|
|
||||||
content: {
|
|
||||||
body: ("a".repeat(130) + " ").repeat(19),
|
|
||||||
msgtype: "m.text"
|
|
||||||
},
|
|
||||||
event_id: "$g07oYSZFWBkxohNEfywldwgcWj1hbhDzQ1sBAKvqOOU",
|
|
||||||
origin_server_ts: 1688301929913,
|
|
||||||
room_id: "!kLRqKKUQXcibIMtOpl:cadence.moe",
|
|
||||||
sender: "@cadence:cadence.moe",
|
|
||||||
type: "m.room.message",
|
|
||||||
unsigned: {
|
|
||||||
age: 405299
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
[{
|
|
||||||
username: "cadence",
|
|
||||||
content: (("a".repeat(130) + " ").repeat(15)).slice(0, -1),
|
|
||||||
avatar_url: undefined
|
|
||||||
}, {
|
|
||||||
username: "cadence",
|
|
||||||
content: (("a".repeat(130) + " ").repeat(4)).slice(0, -1),
|
|
||||||
avatar_url: undefined
|
|
||||||
}]
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
const fs = require("fs")
|
const fs = require("fs")
|
||||||
const assert = require("assert").strict
|
|
||||||
const yaml = require("js-yaml")
|
const yaml = require("js-yaml")
|
||||||
|
|
||||||
/** @ts-ignore @type {import("../types").AppServiceRegistrationConfig} */
|
/** @ts-ignore @type {import("../types").AppServiceRegistrationConfig} */
|
||||||
const reg = yaml.load(fs.readFileSync("registration.yaml", "utf8"))
|
const reg = yaml.load(fs.readFileSync("registration.yaml", "utf8"))
|
||||||
assert(reg.ooye.max_file_size)
|
module.exports = reg
|
||||||
assert(reg.ooye.namespace_prefix)
|
|
||||||
assert(reg.ooye.server_name)
|
|
||||||
module.exports = reg
|
|
Loading…
Add table
Add a link
Reference in a new issue