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
|
||||
RUN apk install gcompat
|
||||
FROM node:20
|
||||
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
|
||||
USER root
|
||||
WORKDIR /home/node/app
|
||||
|
|
18
index.mjs
18
index.mjs
|
@ -50,10 +50,13 @@ async function handleCommand(roomId, event) {
|
|||
|
||||
// Check to ensure that the `!hello` command is being run
|
||||
const body = event['content']['body'];
|
||||
if (!body?.startsWith("!jitsi")) return;
|
||||
// Now that we've passed all the checks, we can actually act upon the command
|
||||
await sendMessageWithUrl(client,roomId);
|
||||
await changeRoomName(client, roomId);
|
||||
if (body?.startsWith("!jitsi")){
|
||||
await sendMessageWithUrl(client,roomId);
|
||||
await changeRoomName(client, roomId);
|
||||
}
|
||||
if (body?.startsWith("!help")){
|
||||
sendHelp(client,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})
|
||||
}
|
||||
}
|
||||
async function sendHelp(client, roomId){
|
||||
await client.sendText(
|
||||
roomId,
|
||||
'Neue Konfernz mit "!jitsi" erstellen'
|
||||
);
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue