preserve multi-line formatting of team invite messages
parent
0df76ed64e
commit
0e9a9ddfe0
|
@ -265,6 +265,7 @@
|
|||
padding: 12px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: @variables_radius;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.cp-teams-invite-password {
|
||||
margin-bottom: 20px;
|
||||
|
|
|
@ -1349,8 +1349,15 @@ define([
|
|||
Messages._getKey('team_inviteFromMsg',
|
||||
[Util.fixHTML(getDisplayName(json.author.displayName)),
|
||||
Util.fixHTML(json.teamName)])));
|
||||
if (json.message) {
|
||||
$div.append(h('div.cp-teams-invite-message', json.message));
|
||||
if (typeof(json.message) === 'string') {
|
||||
var message = h('div.cp-teams-invite-message');
|
||||
json.message.split('\n').forEach(line => {
|
||||
if (line.trim()) {
|
||||
message.appendChild(h('span', line));
|
||||
}
|
||||
message.appendChild(h('br'));
|
||||
});
|
||||
$div.append(message);
|
||||
}
|
||||
}));
|
||||
}).nThen(function (waitFor) {
|
||||
|
|
Loading…
Reference in New Issue