Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Livechat setting to customize ended conversation message #10108

Merged

Conversation

renatobecker-zz
Copy link

@RocketChat/core
Closes #9873

This PR allows to customize the message that will be displayed at the end of the conversation in LiveChat widget.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10108 March 12, 2018 19:31 Inactive
@sampaiodiego sampaiodiego self-requested a review April 2, 2018 20:48
@sampaiodiego sampaiodiego added this to Desireable in 0.64.0 via automation Apr 16, 2018
@sampaiodiego sampaiodiego added this to the 0.64.0 milestone Apr 16, 2018
Copy link
Member

@sampaiodiego sampaiodiego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only small changes.. overall looks good

type: 'string',
group: 'Livechat',
public: true,
section: 'Conversation Finished',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this setting should be on a new Section, it can be confusing (there are other settings that might fit here) and I don't see a reason for a section with only one setting. so I would rather put it bellow Show agent email agent email setting 😉

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're totally right.
I made a mistake, to be honest I'm surprise reviewing this code.
Fixed.

@@ -66,6 +66,13 @@ <h2>{{_ "Settings"}}</h2>
<textarea class="preview-settings rc-input__element" name="offlineSuccessMessage" id="offlineSuccessMessage">{{offlineSuccessMessage}}</textarea>
</div>
</fieldset>
<fieldset>
<legend>{{_ "Conversation_finished"}}</legend>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i18n string is missing

Copy link
Author

@renatobecker-zz renatobecker-zz Apr 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@sampaiodiego sampaiodiego Apr 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️ my global search excludes i18n JSON files. sry 😬

the test instance I used also didn't have this translation 🤷‍♂️

@@ -40,7 +41,7 @@ Template.message.helpers({
case 'wm':
return t('Welcome', { user: this.u.username });
case 'livechat-close':
return t('Conversation_finished');
return (!_.isEmpty(Livechat.conversationFinishedMessage)) ? Livechat.conversationFinishedMessage : t('Conversation_finished');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if possible I would try to not use underscore =)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@sampaiodiego sampaiodiego changed the title [NEW] New setting added to display a message when LiveChat conversation has ended [NEW] New Livechat setting to customize ended conversation message Apr 17, 2018
@sampaiodiego sampaiodiego changed the title [NEW] New Livechat setting to customize ended conversation message [NEW] Livechat setting to customize ended conversation message Apr 17, 2018
@sampaiodiego sampaiodiego merged commit cf6e741 into develop Apr 17, 2018
0.64.0 automation moved this from Desireable to Done Apr 17, 2018
@sampaiodiego sampaiodiego deleted the livechat-customization-of-the-conversation-finished branch April 17, 2018 19:03
@rodrigok rodrigok mentioned this pull request Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
0.64.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants