Update matrix.js to work with ES module change in matrix-js-sdk
(cherry picked from commitplugin-touch-ups7dcd7d8217
)a0f9a93b
Fix/remove broken require line (imported elsewhere)74231f4d
Revert "Fix/remove broken require line (imported elsewhere)"c0a6a1ed
Update matrix.js to work with ES module change in matrix-js-sdk Co-authored-by: John Doe <overdueexchangefumewarning@proton.me>
parent
06450c5e7e
commit
191a45f107
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue