mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 04:12:50 +02:00
refactor kstate, add stub user syncing function
This commit is contained in:
parent
4d8b74f61f
commit
f418d51e55
6 changed files with 181 additions and 143 deletions
|
@ -78,5 +78,15 @@ async function ensureSimJoined(user, roomID) {
|
|||
return mxid
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("discord-api-types/v10").APIUser} user
|
||||
* @param {Required<Omit<import("discord-api-types/v10").APIGuildMember, "user">>} member
|
||||
*/
|
||||
async function memberToStateContent(user, member) {
|
||||
return {
|
||||
displayname: member.nick || user.username
|
||||
}
|
||||
}
|
||||
|
||||
module.exports.ensureSim = ensureSim
|
||||
module.exports.ensureSimJoined = ensureSimJoined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue