mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
Merge branch 'revoltchat:master' into master
This commit is contained in:
16
.github/workflows/mirroring.yml
vendored
16
.github/workflows/mirroring.yml
vendored
@@ -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 }}
|
|
||||||
27
README.md
27
README.md
@@ -1,3 +1,30 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
Ensure `.env.local` points to `https://app.revolt.chat/api`.
|
||||||
|
|
||||||
|
```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
|
# Revite
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ fi
|
|||||||
REMOTE_DIR=/root/deployments/revite
|
REMOTE_DIR=/root/deployments/revite
|
||||||
|
|
||||||
# Post-install script
|
# Post-install script
|
||||||
POST_INSTALL="pm2 restart revite"
|
POST_INSTALL=""
|
||||||
|
|
||||||
# Assets
|
# Assets
|
||||||
export REVOLT_SAAS=https://github.com/revoltchat/assets
|
export REVOLT_SAAS=https://github.com/revoltchat/assets
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ export default observer(({ channel }: Props) => {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const content = state.draft.get(channel._id)?.content?.trim() ?? "";
|
const content = state.draft.get(channel._id)?.content?.trim() ?? "";
|
||||||
if (uploadState.type === "attached") return sendFile(content);
|
if (uploadState.type !== "none") return sendFile(content);
|
||||||
if (content.length === 0) return;
|
if (content.length === 0) return;
|
||||||
|
|
||||||
internalEmit("NewMessages", "hide");
|
internalEmit("NewMessages", "hide");
|
||||||
@@ -406,7 +406,9 @@ export default observer(({ channel }: Props) => {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async function sendFile(content: string) {
|
async function sendFile(content: string) {
|
||||||
if (uploadState.type !== "attached") return;
|
if (uploadState.type !== "attached" && uploadState.type !== "failed")
|
||||||
|
return;
|
||||||
|
|
||||||
const attachments: string[] = [];
|
const attachments: string[] = [];
|
||||||
setMessage;
|
setMessage;
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ class ClientController {
|
|||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
const error = takeError(err);
|
const error = takeError(err);
|
||||||
if (error === "Forbidden" || error === "Unauthorized") {
|
if (error === "Unauthorized") {
|
||||||
this.sessions.delete(user_id);
|
this.sessions.delete(user_id);
|
||||||
this.current = null;
|
this.current = null;
|
||||||
this.pickNextSession();
|
this.pickNextSession();
|
||||||
|
|||||||
@@ -10,8 +10,9 @@ export function takeError(error: any): string {
|
|||||||
case 429:
|
case 429:
|
||||||
return "TooManyRequests";
|
return "TooManyRequests";
|
||||||
case 401:
|
case 401:
|
||||||
|
return "Unauthorized"
|
||||||
case 403:
|
case 403:
|
||||||
return "Unauthorized";
|
return "Forbidden";
|
||||||
default:
|
default:
|
||||||
return "UnknownError";
|
return "UnknownError";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user