Skip to content

Commit

Permalink
Hide messageBack
Browse files Browse the repository at this point in the history
  • Loading branch information
compulim committed Jan 16, 2019
1 parent 0ee0bb6 commit 4d4c4f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
23 changes: 0 additions & 23 deletions packages/component/src/BasicTranscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,6 @@ const LIST_CSS = css({
}
});

function shouldShowActivity(activity) {
if (activity) {
if (activity.type === 'message') {
const { attachments = [], text } = activity;

if (
// Do not show postback
!(activity.channelData && activity.channelData.postBack)
// Do not show messageBack if displayText is undefined
&& !(activity.channelData && activity.channelData.messageBack && !activity.channelData.messageBack.displayText)
// Do not show empty bubbles (no text and attachments, and not "typing")
&& (text || attachments.length)
) {
return true;
}
} else if (activity.type === 'typing') {
return true;
}
}

return false;
}

function sameTimestampGroup(activityX, activityY, groupTimestamp) {
if (groupTimestamp === false) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export default function () {
if (
// Do not show postback
(activity.channelData && activity.channelData.postBack)
// Do not show messageBack if displayText is undefined
|| (activity.channelData && activity.channelData.messageBack && !activity.channelData.messageBack.displayText)
// Do not show empty bubbles (no text and attachments, and not "typing")
|| !(text || attachments.length)
) {
Expand Down

0 comments on commit 4d4c4f2

Please sign in to comment.