diff --git a/native/chat/inner-text-message.react.js b/native/chat/inner-text-message.react.js --- a/native/chat/inner-text-message.react.js +++ b/native/chat/inner-text-message.react.js @@ -109,6 +109,7 @@ style={[styles.text, textStyle]} rules={rules} threadColor={item.threadInfo.color} + isViewer={isViewer} > {text} diff --git a/native/markdown/markdown.react.js b/native/markdown/markdown.react.js --- a/native/markdown/markdown.react.js +++ b/native/markdown/markdown.react.js @@ -17,9 +17,10 @@ +children: string, +rules: MarkdownRules, +threadColor?: string, + +isViewer?: boolean, }; function Markdown(props: Props): React.Node { - const { style, children, rules, threadColor } = props; + const { style, children, rules, threadColor, isViewer } = props; const { simpleMarkdownRules, emojiOnlyFactor, container } = rules; const parser = React.useMemo( @@ -64,9 +65,11 @@ }, [emojiOnly, style, emojiOnlyFactor]); const renderedOutput = React.useMemo(() => { - const color = tinycolor(threadColor).darken(20).toString(); + const color = isViewer + ? tinycolor(threadColor).darken(20).toString() + : `#${String(threadColor)}`; return output(ast, { textStyle, container, color }); - }, [ast, output, textStyle, container, threadColor]); + }, [ast, output, textStyle, container, threadColor, isViewer]); if (container === 'Text') { return {renderedOutput};