mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Fix blocked users appearing in typing indicator.
Make typing indicator time out.
This commit is contained in:
@@ -323,7 +323,7 @@ export default observer(({ channel }: Props) => {
|
||||
|
||||
const ws = client.websocket;
|
||||
if (ws.connected) {
|
||||
setTyping(+new Date() + 4000);
|
||||
setTyping(+new Date() + 2500);
|
||||
ws.send({
|
||||
type: "BeginTyping",
|
||||
channel: channel._id,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { RelationshipStatus } from "revolt-api/types/Users";
|
||||
import { Channel } from "revolt.js/dist/maps/Channels";
|
||||
import styled from "styled-components";
|
||||
|
||||
@@ -57,7 +58,10 @@ const Base = styled.div`
|
||||
|
||||
export default observer(({ channel }: Props) => {
|
||||
const users = channel.typing.filter(
|
||||
(x) => typeof x !== "undefined" && x._id !== x.client.user!._id,
|
||||
(x) =>
|
||||
typeof x !== "undefined" &&
|
||||
x._id !== x.client.user!._id &&
|
||||
x.relationship !== RelationshipStatus.Blocked,
|
||||
);
|
||||
|
||||
if (users.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user