feat: Add emoji and alot of other fixes
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
lucideClock3
|
||||
} from '@ng-icons/lucide';
|
||||
import { ChatMessageMarkdownComponent } from '../../../chat';
|
||||
import { isSingleUnicodeEmojiOnlyMessage } from '../../../custom-emoji';
|
||||
import type { DirectMessage } from '../../domain/models/direct-message.model';
|
||||
|
||||
const RICH_MARKDOWN_PATTERNS = [
|
||||
@@ -40,7 +41,8 @@ export class DmMessageComponent {
|
||||
readonly isOutgoing = computed(() => this.message().senderId === this.currentUserId());
|
||||
|
||||
requiresRichMarkdown(content: string): boolean {
|
||||
return RICH_MARKDOWN_PATTERNS.some((pattern) => pattern.test(content));
|
||||
return isSingleUnicodeEmojiOnlyMessage(content)
|
||||
|| RICH_MARKDOWN_PATTERNS.some((pattern) => pattern.test(content));
|
||||
}
|
||||
|
||||
statusIcon(status: DirectMessage['status']): string {
|
||||
|
||||
Reference in New Issue
Block a user