mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-09 18:15:28 +00:00
Add pin message
This commit is contained in:
@@ -26,6 +26,7 @@ import { PageHeader } from "../../components/ui/Header";
|
||||
import { useClient } from "../../controllers/client/ClientController";
|
||||
import ChannelHeader from "./ChannelHeader";
|
||||
import { MessageArea } from "./messaging/MessageArea";
|
||||
import PinnedMessage from "../../components/common/messaging/bars/PinnedMessage";
|
||||
|
||||
const ChannelMain = styled.div.attrs({ "data-component": "channel" })`
|
||||
flex-grow: 1;
|
||||
@@ -99,7 +100,7 @@ export const Channel = observer(
|
||||
const client = useClient();
|
||||
const state = useApplicationState();
|
||||
|
||||
if (!client.channels.exists(id) && client.servers.get(server_id)) {
|
||||
if (!client.channels.exists(id) && server_id) {
|
||||
if (server_id) {
|
||||
const server = client.servers.get(server_id);
|
||||
if (server && server.channel_ids.length > 0) {
|
||||
@@ -110,7 +111,7 @@ export const Channel = observer(
|
||||
target_id = last_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<Redirect
|
||||
to={`/server/${server_id}/channel/${target_id}`}
|
||||
@@ -188,6 +189,7 @@ const TextChannel = observer(({ channel }: { channel: ChannelI }) => {
|
||||
<ErrorBoundary section="renderer">
|
||||
<ChannelContent>
|
||||
<NewMessages channel={channel} last_id={lastId} />
|
||||
<PinnedMessage channel={channel} />
|
||||
<MessageArea channel={channel} last_id={lastId} />
|
||||
<TypingIndicator channel={channel} />
|
||||
<JumpToBottom channel={channel} />
|
||||
|
||||
Reference in New Issue
Block a user