EmbeddedChat
EmbeddedChat copied to clipboard
Created a new branch to resolve conflicts and fixed the issue of appe…
Brief Title
Fixed the issue of appearence of pinned messages when pinning it with emojis
My code changes
PinnedAttachment.js
import MessageEmoji from '../MessageEmoji/MessageEmoji'
import RCContext from '../../context/RCInstance';
import { Avatar } from '../Avatar';
const PinnedAttachment = ({ attachment }) => {
const { RCInstance } = useContext(RCContext);
const getUserAvatarUrl = (username) => {
const host = RCInstance.getHost();
const URL = `${host}/avatar/${username}`;
return URL;
};
return (
<Box
style={{
borderInlineStart: '1px solid currentColor',
}}
>
<Box style={{paddingLeft: '0.8rem', paddingTop: '0.3rem'}}>
<Avatar
url={getUserAvatarUrl(attachment?.author_name)}
alt="avatar"
size={attachment?.text.t ? '1.2em' : '1.5em'}
/> <>{attachment?.author_name}</>
</Box><br/>
<Box style={{paddingLeft: '1rem', paddingBottom: '0.7rem'}}>{attachment?.text ? (
<MessageEmoji body={attachment?.text} />
) : (
attachment?.txt
)}</Box>
</Box>
)
}
Fixes #374
Video/Screenshots
The issue
After Fixing:
Hello maintainers, Can you please review my Pull Request so that I can follow up. Thank you