Update matrix.js to work with ES module change in matrix-js-sdk

master
John Doe 2024-09-19 17:49:03 +00:00 committed by Moe
parent d8cd1b75f4
commit 7dcd7d8217
1 changed files with 2 additions and 2 deletions

View File

@ -1,13 +1,13 @@
const fs = require("fs")
const fetch = require("node-fetch")
module.exports = function(s,config,lang,getSnapshot){
module.exports = async function(s,config,lang,getSnapshot){
const {
getObjectTagNotifyText,
getEventBasedRecordingUponCompletion,
} = require('../events/utils.js')(s,config,lang)
//matrix bot
if(config.matrixBot === true){
const sdk = require("matrix-js-sdk")
const sdk = await import("matrix-js-sdk")
try{
function sendFile(file,groupKey){
const client = s.group[groupKey].matrixBot