Fix unresolved import for system user ID.

This commit is contained in:
Paul 2021-08-18 11:31:25 +01:00
parent 899593faf0
commit 2341408557
5 changed files with 8 additions and 10 deletions

View file

@ -1,4 +1,3 @@
import { SYSTEM_USER_ID } from "revolt.js";
import { Channel } from "revolt.js/dist/maps/Channels";
import { User } from "revolt.js/dist/maps/Users";
import styled, { css } from "styled-components";
@ -159,7 +158,9 @@ export function useAutoComplete(
}
}
users = users.filter((x) => x._id !== SYSTEM_USER_ID);
users = users.filter(
(x) => x._id !== "00000000000000000000000000",
);
const matches = (
search.length > 0

View file

@ -3,7 +3,6 @@ import { File } from "@styled-icons/boxicons-solid";
import { observer } from "mobx-react-lite";
import { useHistory } from "react-router-dom";
import { RelationshipStatus } from "revolt-api/types/Users";
import { SYSTEM_USER_ID } from "revolt.js";
import { Channel } from "revolt.js/dist/maps/Channels";
import { Message } from "revolt.js/dist/maps/Messages";
import styled, { css } from "styled-components";
@ -173,7 +172,7 @@ export const MessageReply = observer(
<Text id="app.main.channel.misc.blocked_user" />
) : (
<>
{message.author_id === SYSTEM_USER_ID ? (
{message.author_id === "00000000000000000000000000" ? (
<SystemMessage message={message} hideInfo />
) : (
<>

View file

@ -1,7 +1,6 @@
import { At, Reply as ReplyIcon } from "@styled-icons/boxicons-regular";
import { File, XCircle } from "@styled-icons/boxicons-solid";
import { observer } from "mobx-react-lite";
import { SYSTEM_USER_ID } from "revolt.js";
import { Channel } from "revolt.js/dist/maps/Channels";
import { Message } from "revolt.js/dist/maps/Messages";
import styled from "styled-components";
@ -150,7 +149,8 @@ export default observer(({ channel, replies, setReplies }: Props) => {
</em>
</>
)}
{message.author_id === SYSTEM_USER_ID ? (
{message.author_id ===
"00000000000000000000000000" ? (
<SystemMessage message={message} hideInfo />
) : (
<Markdown

View file

@ -1,6 +1,5 @@
import { Route, Switch, useHistory, useParams } from "react-router-dom";
import { Presence, RelationshipStatus } from "revolt-api/types/Users";
import { SYSTEM_USER_ID } from "revolt.js";
import { Message } from "revolt.js/dist/maps/Messages";
import { User } from "revolt.js/dist/maps/Users";
import { decodeTime } from "ulid";
@ -72,7 +71,7 @@ function Notifier({ options, notifs }: Props) {
title = `@${msg.author?.username}`;
break;
case "Group":
if (msg.author?._id === SYSTEM_USER_ID) {
if (msg.author?._id === "00000000000000000000000000") {
title = msg.channel.name;
} else {
title = `@${msg.author?.username} - ${msg.channel.name}`;

View file

@ -2,7 +2,6 @@
import { X } from "@styled-icons/boxicons-regular";
import { observer } from "mobx-react-lite";
import { RelationshipStatus } from "revolt-api/types/Users";
import { SYSTEM_USER_ID } from "revolt.js";
import { Message as MessageI } from "revolt.js/dist/maps/Messages";
import styled from "styled-components";
import { decodeTime } from "ulid";
@ -141,7 +140,7 @@ const MessageRenderer = observer(({ renderer, queue, highlight }: Props) => {
);
}
if (message.author_id === SYSTEM_USER_ID) {
if (message.author_id === "00000000000000000000000000") {
render.push(
<SystemMessage
key={message._id}