forked from cadence/out-of-your-element
Keep sim_proxy profile data up to date
This commit is contained in:
parent
5a152b87b8
commit
d8e6de62e5
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ async function syncUser(messageID, author, roomID, shouldActuallySync) {
|
|||
try {
|
||||
// API lookup
|
||||
var pkMessage = await fetchMessage(messageID)
|
||||
db.prepare("INSERT OR IGNORE INTO sim_proxy (user_id, proxy_owner_id, displayname) VALUES (?, ?, ?)").run(pkMessage.member.uuid, pkMessage.sender, author.username)
|
||||
db.prepare("REPLACE INTO sim_proxy (user_id, proxy_owner_id, displayname) VALUES (?, ?, ?)").run(pkMessage.member.uuid, pkMessage.sender, author.username)
|
||||
} catch (e) {
|
||||
// Fall back to offline cache
|
||||
const senderMxid = from("sim_proxy").join("sim", "user_id").join("sim_member", "mxid").where({displayname: author.username, room_id: roomID}).pluck("mxid").get()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue