diff --git a/assets/js/components/posts/interface.js b/assets/js/components/posts/interface.js index 1df7c96a..7e1ae358 100644 --- a/assets/js/components/posts/interface.js +++ b/assets/js/components/posts/interface.js @@ -60,9 +60,11 @@ ComunicWeb.components.posts.interface = { * Get the list of the latest posts * * @param {number} lastPostID The ID of the loast loaded post (or 0) + * @param {boolean} include_groups Specify whether groups posts should be + * included or not * @param {function} callback What to do when we got response */ - get_latest: function(lastPostID, callback){ + get_latest: function(lastPostID, include_groups, callback){ if(lastPostID > 0) lastPostID--; @@ -70,7 +72,8 @@ ComunicWeb.components.posts.interface = { //Prepare API request var APIuri = "posts/get_latest"; var params = { - startFrom: lastPostID + startFrom: lastPostID, + include_groups: include_groups }; //Perform the request diff --git a/assets/js/pages/latestPosts/main.js b/assets/js/pages/latestPosts/main.js index e91455e7..f4569b81 100644 --- a/assets/js/pages/latestPosts/main.js +++ b/assets/js/pages/latestPosts/main.js @@ -92,7 +92,7 @@ ComunicWeb.pages.latestPosts.main = { _load_list: function(target){ //Perform a request on the server to get the list of latest posts - ComunicWeb.components.posts.interface.get_latest(this._last_post_id, function(response){ + ComunicWeb.components.posts.interface.get_latest(this._last_post_id, true, function(response){ //Check for errors - display a modal if(response.error){