mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-21 06:30:58 -05:00
fix: allow retrying sending files
This commit is contained in:
parent
c25ecc12b2
commit
5b6546b761
2 changed files with 6 additions and 2 deletions
|
@ -6,6 +6,8 @@ PRs for small fixes are more than welcome.
|
||||||
|
|
||||||
## Deploying a new release
|
## Deploying a new release
|
||||||
|
|
||||||
|
Ensure `.env.local` points to `https://app.revolt.chat/api`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/deployments/revite
|
cd ~/deployments/revite
|
||||||
git pull
|
git pull
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue