fix DOcker file
This commit is contained in:
parent
5222e04329
commit
98c1201688
2 changed files with 15 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
||||||
FROM node:20-alpine
|
FROM node:20
|
||||||
RUN apk install gcompat
|
|
||||||
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
|
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
|
||||||
USER root
|
USER root
|
||||||
WORKDIR /home/node/app
|
WORKDIR /home/node/app
|
||||||
|
|
14
index.mjs
14
index.mjs
|
@ -50,10 +50,13 @@ async function handleCommand(roomId, event) {
|
||||||
|
|
||||||
// Check to ensure that the `!hello` command is being run
|
// Check to ensure that the `!hello` command is being run
|
||||||
const body = event['content']['body'];
|
const body = event['content']['body'];
|
||||||
if (!body?.startsWith("!jitsi")) return;
|
if (body?.startsWith("!jitsi")){
|
||||||
// Now that we've passed all the checks, we can actually act upon the command
|
|
||||||
await sendMessageWithUrl(client,roomId);
|
await sendMessageWithUrl(client,roomId);
|
||||||
await changeRoomName(client, roomId);
|
await changeRoomName(client, roomId);
|
||||||
|
}
|
||||||
|
if (body?.startsWith("!help")){
|
||||||
|
sendHelp(client,roomId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createConference(roomId) {
|
function createConference(roomId) {
|
||||||
|
@ -73,3 +76,10 @@ async function changeRoomName(client, roomId){
|
||||||
await client.sendStateEvent(roomId,'m.room.topic','',{'topic':roomDescription+"\n\r"+conferenceUrl})
|
await client.sendStateEvent(roomId,'m.room.topic','',{'topic':roomDescription+"\n\r"+conferenceUrl})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
async function sendHelp(client, roomId){
|
||||||
|
await client.sendText(
|
||||||
|
roomId,
|
||||||
|
'Neue Konfernz mit "!jitsi" erstellen'
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue