Private
Public Access
Add custom emoji support (#18)
Site-wide, any user can upload -- usable both as reactions and inline in message text via :shortcode:, alongside the existing built-in Unicode picker. A :shortcode: reference is stored/sent as literal text (same as the built-in shortcode convention) and resolved to an image at render time, so it degrades to plain text if the emoji is later deleted. Backend: new custom_emoji table (shortcode unique, sized to fit MessageReaction.emoji's existing column alongside its colons), upload/ list/delete endpoints (delete restricted to uploader or site admin). Frontend: a CustomEmojiProvider context feeds a new "Custom" category in the emoji picker (inline upload + hover-to-remove), extends the composer's shortcode autocomplete, and a shared EmojiGlyph resolver renders custom emoji wherever a value can appear -- message text, reaction pills, and the picker itself. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import { EMOJI_PICKER_MAX_HEIGHT, EmojiPicker } from './EmojiPicker'
|
||||
import { FilePreviewModal, getPreviewKind } from './FilePreviewModal'
|
||||
import { ImageLightbox } from './ImageLightbox'
|
||||
import { LinkPreviewCard } from './LinkPreviewCard'
|
||||
import { MessageContent } from './MessageContent'
|
||||
import { EmojiGlyph, MessageContent } from './MessageContent'
|
||||
import { UserAvatar } from './UserAvatar'
|
||||
import { VideoLightbox } from './VideoLightbox'
|
||||
import './MessageList.css'
|
||||
@@ -302,7 +302,9 @@ export function MessageList({
|
||||
title={r.user_ids.map(displayNameForUserId).join(', ')}
|
||||
onClick={() => onReact(msg.id, r.emoji)}
|
||||
>
|
||||
<span>{r.emoji}</span>
|
||||
<span>
|
||||
<EmojiGlyph value={r.emoji} />
|
||||
</span>
|
||||
<span>{r.count}</span>
|
||||
</button>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user