fix: clean up redundant regex guard and differentiate copy icons
This commit is contained in:
@@ -1103,7 +1103,7 @@ function handleMarkUnread(event: Record<string, unknown>, userId: string): void
|
||||
const channelId = event.channelId as string;
|
||||
const messageId = event.messageId as string;
|
||||
if (!channelId || !messageId) return;
|
||||
if (!/^\d+$/.test(messageId) && messageId !== '0') return;
|
||||
if (!/^\d+$/.test(messageId)) return;
|
||||
|
||||
// Validate channel membership
|
||||
const spaceId = getChannelSpaceId(channelId);
|
||||
|
||||
@@ -103,7 +103,7 @@ export function buildMessageMenuItems(params: MessageMenuParams): ContextMenuIte
|
||||
hidden: selectedText.length === 0,
|
||||
icon: (
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z" />
|
||||
<path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z" />
|
||||
</svg>
|
||||
),
|
||||
onClick: () => {
|
||||
|
||||
Reference in New Issue
Block a user