mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-09 18:15:28 +00:00
disallow user to pin
This commit is contained in:
@@ -93,7 +93,7 @@ export const PinMessageBox = observer(
|
||||
|
||||
|
||||
let children = null;
|
||||
let userName = message.client ? message.client.user?.username : ""
|
||||
let userName = message.client ? message.system.by_username : ""
|
||||
|
||||
|
||||
if (data.type as string == "message_pinned") {
|
||||
|
||||
@@ -857,9 +857,7 @@ export default function ContextMenus() {
|
||||
action: "mark_unread",
|
||||
message,
|
||||
});
|
||||
if (sendPermission) {
|
||||
|
||||
|
||||
if (channelPermissions & Permission.ManageMessages) {
|
||||
if (message.is_pinned && channel?.channel_type != "DirectMessage") {
|
||||
generateAction({
|
||||
action: "unpin_message",
|
||||
|
||||
@@ -164,8 +164,6 @@ export default observer(({ last_id, renderer, highlight }: Props) => {
|
||||
previous.masquerade,
|
||||
);
|
||||
}
|
||||
// console.log(renderer.messages[i].content, 7979)
|
||||
|
||||
|
||||
if (message.system?.type as any == "message_pinned" || message.system?.type as any == "message_unpinned") {
|
||||
render.push(
|
||||
|
||||
Reference in New Issue
Block a user