Compare commits

..

3 commits

Author SHA1 Message Date
Sophie L
c25ecc12b2 chore: rm mirroring script 2024-03-13 23:51:56 +00:00
Paul Makles
60fdb5c091
docs: legacy release procedure 2024-03-13 23:41:54 +00:00
Bob Bobs
472e6e07b5 fix: only delete session if error is Unauthorized 2024-03-13 22:55:12 +00:00
5 changed files with 29 additions and 19 deletions

View file

@ -1,16 +0,0 @@
name: Mirroring
on:
push:
branches:
- "master"
jobs:
to_gitlab:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url: git@gitlab.com:insert/revolt-vite.git
ssh_private_key: ${{ secrets.GITLAB_SSH_PRIVATE_KEY }}

View file

@ -1,3 +1,28 @@
# Deprecation Notice
This project is deprecated, however it still may receive maintenance updates.
PRs for small fixes are more than welcome.
## Deploying a new release
```bash
cd ~/deployments/revite
git pull
git submodule update
# check:
git status
export REVOLT_SAAS_BRANCH=revite/main
export REMOTE=root@production
scripts/publish.sh
# SSH in and restart revite:
ssh $REMOTE
tmux a -t 4
```
# Revite
## Description

View file

@ -11,7 +11,7 @@ fi
REMOTE_DIR=/root/deployments/revite
# Post-install script
POST_INSTALL="pm2 restart revite"
POST_INSTALL=""
# Assets
export REVOLT_SAAS=https://github.com/revoltchat/assets

View file

@ -159,7 +159,7 @@ class ClientController {
})
.catch((err) => {
const error = takeError(err);
if (error === "Forbidden" || error === "Unauthorized") {
if (error === "Unauthorized") {
this.sessions.delete(user_id);
this.current = null;
this.pickNextSession();

View file

@ -10,8 +10,9 @@ export function takeError(error: any): string {
case 429:
return "TooManyRequests";
case 401:
return "Unauthorized"
case 403:
return "Unauthorized";
return "Forbidden";
default:
return "UnknownError";
}