Skip to content

Commit

Permalink
feat: ✨ Upgrade Baileys (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
robvanderleek authored Feb 1, 2024
1 parent c00f955 commit 68b51f3
Show file tree
Hide file tree
Showing 6 changed files with 903 additions and 1,028 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
dist-ncc/
dist/
binaries/
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ ENV GIT_SSL_NO_VERIFY 1
ENV MUDSLIDE_CACHE_FOLDER /usr/src/app/cache
RUN apt-get update && apt-get install -y --no-install-recommends git
RUN git config --global url."https://github".insteadOf ssh://git@github
RUN npm install -g mudslide@latest
ENTRYPOINT ["/usr/local/bin/mudslide"]
RUN mkdir /app
COPY . /app
WORKDIR /app
RUN yarn install
ENTRYPOINT ["yarn", "start"]
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ Since Mudslide keeps authentication state on disk you need to mount a state
directory outside the container, for example:

```shell
docker run -v /home/<USERNAME>/.local/share/mudslide:/usr/src/app/cache mudslide login
docker run -v $HOME/.local/share/mudslide:/usr/src/app/cache mudslide login
```

or:

```shell
docker run -v $HOME/.local/share/mudslide:/usr/src/app/cache mudslide me
```

## Docker Compose
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
"dependencies": {
"@adiwajshing/keyed-db": "^0.2.4",
"@hapi/boom": "^10.0.0",
"@whiskeysockets/baileys": "^6.5.0",
"@whiskeysockets/baileys": "^6.6.0",
"commander": "^9.4.1",
"global-agent": "^3.0.0",
"mime": "^3.0.0",
"pino": "^8.7.0",
"pino": "^7.0.0",
"qrcode-terminal": "^0.12.0",
"signale": "^1.4.0"
},
Expand Down
4 changes: 2 additions & 2 deletions src/whatsapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export async function initWASocket(printQR = true, message: string | undefined =
return socket;
}

export function terminate(socket: any, waitSeconds = 0) {
export function terminate(socket: any, waitSeconds = 1) {
if (waitSeconds > 0) {
signale.await(`Waiting ${waitSeconds} second(s) for successful delivery...`);
signale.await(`Closing WA connection, waiting for ${waitSeconds} second(s)...`);
}
setTimeout(() => {
socket.end(undefined);
Expand Down
Loading

0 comments on commit 68b51f3

Please sign in to comment.