{"action":"opened","issue":{"url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/358","repository_url":"https://api.github.com/repos/jagi/meteor-astronomy","labels_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/358/labels{/name}","comments_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/358/comments","events_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/358/events","html_url":"https://github.com/jagi/meteor-astronomy/issues/358","id":151323768,"number":358,"title":"Push not working?","user":{"login":"dnish","id":7636313,"avatar_url":"https://avatars.githubusercontent.com/u/7636313?v=3","gravatar_id":"","url":"https://api.github.com/users/dnish","html_url":"https://github.com/dnish","followers_url":"https://api.github.com/users/dnish/followers","following_url":"https://api.github.com/users/dnish/following{/other_user}","gists_url":"https://api.github.com/users/dnish/gists{/gist_id}","starred_url":"https://api.github.com/users/dnish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnish/subscriptions","organizations_url":"https://api.github.com/users/dnish/orgs","repos_url":"https://api.github.com/users/dnish/repos","events_url":"https://api.github.com/users/dnish/events{/privacy}","received_events_url":"https://api.github.com/users/dnish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-27T08:07:04Z","updated_at":"2016-04-27T08:07:04Z","closed_at":null,"body":"Hi,\r\nI'm having some issues with push, it seems like Astronomy doesn't add the objects to the array. This is my Astronomy class:\r\n```\r\nChat = Astro.Class({\r\n    name: 'Chat',\r\n    collection: Chats,\r\n    fields: {\r\n        user1: \"string\",\r\n        user2: \"string\",\r\n        createdAt: \"date\",\r\n        messages: {\r\n            type: 'number',\r\n            default: 0\r\n        },\r\n        isTyping: {\r\n            type:'array',\r\n            default: function() { return []; }\r\n        },\r\n        lastActivity: \"date\"\r\n    }\r\n}\r\n```\r\nIf a user is typing, I'll execute the method \"isTyping\":\r\n\r\n```\r\n'isTyping':function() \r\n{\r\n   var chat = Chat.findOne({_id:chatId,$or:[{user1:this.userId},{user2:this.userId}]});\r\n        if(!chat) return false;\r\n\r\n        chat.push('isTyping',\r\n            {\r\n                userId:this.userId,\r\n                lastActivity: new Date()\r\n            });\r\n        \r\n        chat.save();\r\n}\r\n```\r\n\r\nIf I execute \"getModified\" after push, I only get <code>{}</code> as return value, <code>chat.validate()</code> returns <code>true</code>. Any idea if I did something wrong here?"}}