Compare commits
2 commits
1dcd5620c4
...
0d398be60a
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d398be60a | |||
| b9be8b5887 |
2 changed files with 5 additions and 5 deletions
|
|
@ -245,7 +245,7 @@ async function syncUser(user, member, channel, guild, roomID, interactionMetadat
|
||||||
async function _sendSyncUser(roomID, mxid, content, powerLevel, options) {
|
async function _sendSyncUser(roomID, mxid, content, powerLevel, options) {
|
||||||
const currentHash = _hashProfileContent(content, powerLevel ?? 0)
|
const currentHash = _hashProfileContent(content, powerLevel ?? 0)
|
||||||
const existingHash = select("sim_member", "hashed_profile_content", {room_id: roomID, mxid}).safeIntegers().pluck().get()
|
const existingHash = select("sim_member", "hashed_profile_content", {room_id: roomID, mxid}).safeIntegers().pluck().get()
|
||||||
console.log(roomID, mxid, existingHash, currentHash)
|
// console.log(roomID, mxid, existingHash, currentHash)
|
||||||
// only do the actual sync if the hash has changed since we last looked
|
// only do the actual sync if the hash has changed since we last looked
|
||||||
const hashHasChanged = existingHash !== currentHash
|
const hashHasChanged = existingHash !== currentHash
|
||||||
// always okay to add new data. for overwriting, restrict based on options.allowOverwrite, if present
|
// always okay to add new data. for overwriting, restrict based on options.allowOverwrite, if present
|
||||||
|
|
|
||||||
8
start.js
8
start.js
|
|
@ -14,6 +14,10 @@ const sync = new HeatSync({watchFunction: fs.watchFile})
|
||||||
|
|
||||||
Object.assign(passthrough, {sync, db})
|
Object.assign(passthrough, {sync, db})
|
||||||
|
|
||||||
|
const orm = sync.require("./src/db/orm")
|
||||||
|
passthrough.from = orm.from
|
||||||
|
passthrough.select = orm.select
|
||||||
|
|
||||||
const DiscordClient = require("./src/d2m/discord-client")
|
const DiscordClient = require("./src/d2m/discord-client")
|
||||||
|
|
||||||
const discord = new DiscordClient(reg.ooye.discord_token)
|
const discord = new DiscordClient(reg.ooye.discord_token)
|
||||||
|
|
@ -22,10 +26,6 @@ passthrough.discord = discord
|
||||||
const {as} = require("./src/matrix/appservice")
|
const {as} = require("./src/matrix/appservice")
|
||||||
passthrough.as = as
|
passthrough.as = as
|
||||||
|
|
||||||
const orm = sync.require("./src/db/orm")
|
|
||||||
passthrough.from = orm.from
|
|
||||||
passthrough.select = orm.select
|
|
||||||
|
|
||||||
const power = require("./src/matrix/power.js")
|
const power = require("./src/matrix/power.js")
|
||||||
sync.require("./src/m2d/event-dispatcher")
|
sync.require("./src/m2d/event-dispatcher")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue