1
0
Fork 0

PK mentions now include member name

This commit is contained in:
Cadence Ember 2024-02-01 22:22:48 +13:00
parent 64671519bd
commit 98477dc0f6
4 changed files with 16 additions and 6 deletions

View file

@ -128,7 +128,7 @@ async function memberToStateContent(pkMessage, author) {
async function syncUser(author, pkMessage, roomID) {
const mxid = await ensureSimJoined(pkMessage, roomID)
// Update the sim_proxy table, so mentions can look up the original sender later
db.prepare("INSERT OR IGNORE INTO sim_proxy (user_id, proxy_owner_id) VALUES (?, ?)").run(pkMessage.member.uuid, pkMessage.sender)
db.prepare("INSERT OR IGNORE INTO sim_proxy (user_id, proxy_owner_id, displayname) VALUES (?, ?, ?)").run(pkMessage.member.uuid, pkMessage.sender, author.username)
// Sync the member state
const content = await memberToStateContent(pkMessage, author)
const currentHash = registerUser._hashProfileContent(content)