mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-10 11:11:02 +00:00
1 parent
0af364d076
commit
dec3f94392
3 files changed
+6
-4
No files matched your search
@@ -648,10 +648,11 @@
|
||||
* @desc Return a sanitized object used to send to the server.
|
||||
* @return an object literal copy of the Message instance
|
||||
*/
|
||||
Message.prototype.$omit = function() {
|
||||
var message = {};
|
||||
Message.prototype.$omit = function(options) {
|
||||
var message = {},
|
||||
privateAttributes = options && options.privateAttributes;
|
||||
angular.forEach(this, function(value, key) {
|
||||
if (key != 'constructor' && key[0] != '$') {
|
||||
if (key != 'constructor' && key[0] != '$' || privateAttributes) {
|
||||
message[key] = value;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user