Add receive support for pin/unpin message

This commit is contained in:
Jamie
2025-12-04 12:47:19 -08:00
committed by GitHub
parent 1b03cc4b9b
commit efe2c8de71
24 changed files with 861 additions and 97 deletions

View File

@@ -4,7 +4,7 @@
import React, { type ReactNode } from 'react';
import type { LocalizerType } from '../../types/I18N.std.js';
import { AxoMenuBuilder } from '../../axo/AxoMenuBuilder.dom.js';
import { isPinnedMessagesEnabled } from '../../util/isPinnedMessagesEnabled.std.js';
import { isPinnedMessagesReceiveEnabled } from '../../util/isPinnedMessagesEnabled.std.js';
type MessageContextMenuProps = Readonly<{
i18n: LocalizerType;
@@ -99,7 +99,7 @@ export function MessageContextMenu({
{i18n('icu:copy')}
</AxoMenuBuilder.Item>
)}
{isPinnedMessagesEnabled() && onPinMessage && (
{isPinnedMessagesReceiveEnabled() && onPinMessage && (
<AxoMenuBuilder.Item symbol="pin" onSelect={onPinMessage}>
{i18n('icu:MessageContextMenu__PinMessage')}
</AxoMenuBuilder.Item>