diff --git a/app/javascript/chat/chat.jsx b/app/javascript/chat/chat.jsx index 0cb0372e3..32843a338 100644 --- a/app/javascript/chat/chat.jsx +++ b/app/javascript/chat/chat.jsx @@ -523,6 +523,14 @@ export default class Chat extends Component { .trigger('client-initiatevideocall', { channelId: activeChannelId, }); + } else if (message.startsWith('/new')) { + this.setActiveContentState(activeChannelId, { + type_of: 'loading-post', + }); + this.setActiveContent({ + path: '/new', + type_of: 'article' + }) } else if (message.startsWith('/github')) { const args = message.split('/github ')[1].trim(); this.setActiveContentState(activeChannelId, { type_of: 'github', args }); diff --git a/app/javascript/src/utils/getUnopenedChannels.jsx b/app/javascript/src/utils/getUnopenedChannels.jsx index edd0ab573..28b613c90 100644 --- a/app/javascript/src/utils/getUnopenedChannels.jsx +++ b/app/javascript/src/utils/getUnopenedChannels.jsx @@ -149,6 +149,10 @@ function manageChannel(json) { } export default function getUnopenedChannels() { + if (window.frameElement) { + // We don't want this triggered within context of iframe. + return; + } render( #{"
" if article.main_image.present?}

#{article.title}

-

#{article.cached_user.name}・#{article.readable_publish_date}

+

#{article.cached_user.name}・#{article.readable_publish_date || 'Draft Post'}

".html_safe elsif tag = rich_link_tag(anchor) html += "