diff options
| author | Nikunj Ladava <nla@odoo.com> | 2018-02-02 06:21:44 +0000 |
|---|---|---|
| committer | Xavier-Do <xdo@odoo.com> | 2019-08-05 11:50:19 +0000 |
| commit | 0c37b9fb39005eab70ee8b39da84f79c981b2695 (patch) | |
| tree | f365ab14cca2a776cb0c91587f841ba95257f8de /addons/mail/static/src/js/models/threads/searchable_thread.js | |
| parent | 634bdbfa3a316fcaa9323f97bb59f198cd771b27 (diff) | |
[IMP] mail, test_mail: new 'History' mailbox in Discuss
This commit adds a new mailbox in the Discuss app called 'History'.
Messages that have been marked as read are moved to 'History'.
Notifications are required to link history messages to users. So
notifications are now deleted after they are more tha 6 months old.
This means History mailbox keeps less than 6 months old messages.
Note that this feature only works when user notifications are handled
in Odoo. This can be set in the user preferences, under the
"Notification Management" section.
Task-ID 402597
Diffstat (limited to 'addons/mail/static/src/js/models/threads/searchable_thread.js')
| -rw-r--r-- | addons/mail/static/src/js/models/threads/searchable_thread.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/models/threads/searchable_thread.js b/addons/mail/static/src/js/models/threads/searchable_thread.js index 511bc6348c8..74018af1bc0 100644 --- a/addons/mail/static/src/js/models/threads/searchable_thread.js +++ b/addons/mail/static/src/js/models/threads/searchable_thread.js @@ -135,11 +135,12 @@ var SearchableThread = Thread.extend({ * @override * @private * @param {mail.model.Message} message - * @param {Object} options + * @param {Object} [options={}] * @param {Array} [options.domain=[]] * @param {boolean} [options.incrementUnread=false] */ _addMessage: function (message, options) { + options = options || {}; this._super.apply(this, arguments); var cache = this._getCache(options.domain || []); var index = _.sortedIndex(cache.messages, message, function (msg) { |
