Support the HTML tags that are sent for message body. Closes #2717
This commit is contained in:
@@ -28,6 +28,10 @@
|
||||
color: var(--theme-color-components-text-on-light);
|
||||
text-overflow: ellipsis;
|
||||
line-height: 1.2rem;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.account {
|
||||
|
||||
@@ -14,7 +14,7 @@ export const Follow = Template.bind({});
|
||||
Follow.args = {
|
||||
message: {
|
||||
type: 'FEDIVERSE_ENGAGEMENT_FOLLOW',
|
||||
body: 'james followed this live stream.',
|
||||
body: '<p>james followed this live stream.</p>',
|
||||
title: 'james@mastodon.social',
|
||||
image: 'https://mastodon.social/avatars/original/missing.png',
|
||||
link: 'https://mastodon.social/@james',
|
||||
@@ -25,7 +25,7 @@ export const Like = Template.bind({});
|
||||
Like.args = {
|
||||
message: {
|
||||
type: 'FEDIVERSE_ENGAGEMENT_LIKE',
|
||||
body: 'james liked that this stream went live.',
|
||||
body: '<p>james liked that this stream went live.</p>',
|
||||
title: 'james@mastodon.social',
|
||||
image: 'https://mastodon.social/avatars/original/missing.png',
|
||||
link: 'https://mastodon.social/@james',
|
||||
@@ -36,7 +36,7 @@ export const Repost = Template.bind({});
|
||||
Repost.args = {
|
||||
message: {
|
||||
type: 'FEDIVERSE_ENGAGEMENT_REPOST',
|
||||
body: 'james shared this stream with their followers.',
|
||||
body: '<p>james shared this stream with their followers.</p>',
|
||||
title: 'james@mastodon.social',
|
||||
image: 'https://mastodon.social/avatars/original/missing.png',
|
||||
link: 'https://mastodon.social/@james',
|
||||
@@ -47,7 +47,7 @@ export const LongAccountName = Template.bind({});
|
||||
LongAccountName.args = {
|
||||
message: {
|
||||
type: 'FEDIVERSE_ENGAGEMENT_REPOST',
|
||||
body: 'james shared this stream with their followers.',
|
||||
body: '<p>james shared this stream with their followers.</p>',
|
||||
title: 'littlejimmywilliams@technology.biz.net.org.technology.gov',
|
||||
image: 'https://mastodon.social/avatars/original/missing.png',
|
||||
link: 'https://mastodon.social/@james',
|
||||
@@ -58,7 +58,7 @@ export const InvalidAvatarImage = Template.bind({});
|
||||
InvalidAvatarImage.args = {
|
||||
message: {
|
||||
type: 'FEDIVERSE_ENGAGEMENT_REPOST',
|
||||
body: 'james shared this stream with their followers.',
|
||||
body: '<p>james shared this stream with their followers.</p>',
|
||||
title: 'james@mastodon.social',
|
||||
image: 'https://xx.xx/avatars/original/missing.png',
|
||||
link: 'https://mastodon.social/@james',
|
||||
|
||||
@@ -51,7 +51,7 @@ export const ChatSocialMessage: FC<ChatSocialMessageProps> = ({ message }) => {
|
||||
</Col>
|
||||
<Col>
|
||||
<Row className={styles.account}>{title}</Row>
|
||||
<Row className={styles.body}>{body}</Row>
|
||||
<Row className={styles.body} dangerouslySetInnerHTML={{ __html: body }} />
|
||||
</Col>
|
||||
</Row>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user