Merge branch 'master' into 'master'
Update matrix.js to work with ES module change in matrix-js-sdk See merge request Shinobi-Systems/Shinobi!511master
commit
03898a3382
|
@ -1,13 +1,13 @@
|
||||||
const fs = require("fs")
|
const fs = require("fs")
|
||||||
const fetch = require("node-fetch")
|
const fetch = require("node-fetch")
|
||||||
module.exports = function(s,config,lang,getSnapshot){
|
module.exports = async function(s,config,lang,getSnapshot){
|
||||||
const {
|
const {
|
||||||
getObjectTagNotifyText,
|
getObjectTagNotifyText,
|
||||||
getEventBasedRecordingUponCompletion,
|
getEventBasedRecordingUponCompletion,
|
||||||
} = require('../events/utils.js')(s,config,lang)
|
} = require('../events/utils.js')(s,config,lang)
|
||||||
//matrix bot
|
//matrix bot
|
||||||
if(config.matrixBot === true){
|
if(config.matrixBot === true){
|
||||||
const sdk = require("matrix-js-sdk")
|
const sdk = await import("matrix-js-sdk")
|
||||||
try{
|
try{
|
||||||
function sendFile(file,groupKey){
|
function sendFile(file,groupKey){
|
||||||
const client = s.group[groupKey].matrixBot
|
const client = s.group[groupKey].matrixBot
|
||||||
|
|
Loading…
Reference in New Issue