@chat21/chat21-ionic 3.0.99 → 3.0.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -975,21 +975,27 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
975
975
|
}
|
|
976
976
|
|
|
977
977
|
createEmailText(lastMessageText: string): string {
|
|
978
|
-
let
|
|
979
|
-
|
|
978
|
+
let lastDate = new Date().toDateString();
|
|
979
|
+
let lastTime = new Date().getHours() + ':' + new Date().getMinutes() + ':' + new Date().getSeconds()
|
|
980
|
+
let text = 'On _' + lastDate + ' - ' + lastTime + '_ **' + this.loggedUser.fullname.trimEnd() + '**' + ' replied to you' + ': ' + '\n' +
|
|
981
|
+
lastMessageText + '\n\n\n'
|
|
982
|
+
|
|
983
|
+
//ADD CONVERSATION HISTORRY TO THE BODY OF THE EMAIL
|
|
984
|
+
let messages = JSON.parse(JSON.stringify(this.messages))
|
|
985
|
+
messages.reverse().forEach((message, index) => {
|
|
980
986
|
|
|
981
987
|
let date = new Date(message.timestamp).toDateString()
|
|
982
988
|
let time = new Date(message.timestamp).getHours() + ':' + new Date(message.timestamp).getMinutes() + ':' + new Date(message.timestamp).getSeconds()
|
|
983
989
|
if (isInfo(message))
|
|
984
990
|
return;
|
|
991
|
+
// if (index === 0)
|
|
992
|
+
// text += 'On _' + date + ' - ' + time + '_ **' + message.sender_fullname.trimEnd() + '**' + ' replied to you' + ': ' + '\n' +
|
|
993
|
+
// message.text + '\n\n\n'
|
|
985
994
|
if (index === 0)
|
|
986
|
-
text += 'On _' + date + ' - ' + time + '_ **' + message.sender_fullname.trimEnd() + '**' + ' replied to you' + ': ' + '\n' +
|
|
987
|
-
message.text + '\n\n\n'
|
|
988
|
-
if (index === 1)
|
|
989
995
|
text += '_______________________________________________' + '\n' +
|
|
990
996
|
'**' + 'CONVERSATION HISTORY:' + '**' + '\n' +
|
|
991
997
|
'**' + message.sender_fullname.trimEnd() + '**' + ': ' + message.text + ' _(' + date + '-' + time + ')_' + '\n'
|
|
992
|
-
if (index >
|
|
998
|
+
if (index > 0)
|
|
993
999
|
text += '**' + message.sender_fullname.trimEnd() + '**' + ': ' + message.text + ' _(' + date + '-' + time + ')_' + '\n'
|
|
994
1000
|
})
|
|
995
1001
|
|