forked from cadence/out-of-your-element
Add include_user_id_in_mxid setting
This commit is contained in:
parent
eb98af0ac3
commit
541c5e1eb5
4 changed files with 15 additions and 0 deletions
|
@ -44,3 +44,11 @@ test("user2name: uses ID when name has only disallowed characters", t => {
|
|||
test("user2name: works on special user", t => {
|
||||
t.equal(userToSimName(data.user.clyde_ai), "clyde_ai")
|
||||
})
|
||||
|
||||
test("user2name: includes ID if requested in config", t => {
|
||||
const reg = require("../../matrix/read-registration")
|
||||
reg.ooye.include_user_id_in_mxid = true
|
||||
t.equal(userToSimName({username: "Harry Styles!", discriminator: "0001", id: "123456"}), "123456_harry_styles")
|
||||
t.equal(userToSimName({username: "f***", discriminator: "0001", id: "123456"}), "123456_f")
|
||||
reg.ooye.include_user_id_in_mxid = false
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue