Skip to content

Commit

Permalink
Fix last_status parameter for notifications and conversations (mastod…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and hiyuki2578 committed Oct 2, 2019
1 parent 98c1149 commit 1c14242
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/actions/conversations.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const expandConversations = ({ maxId } = {}) => (dispatch, getState) => {
const params = { max_id: maxId };

if (!maxId) {
params.since_id = getState().getIn(['conversations', 0, 'last_status']);
params.since_id = getState().getIn(['conversations', 'items', 0, 'last_status']);
}

api(getState).get('/api/v1/conversations', { params })
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/mastodon/actions/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function expandNotifications({ maxId } = {}, done = noOp) {
};

if (!maxId && notifications.get('items').size > 0) {
params.since_id = notifications.getIn(['items', 0]);
params.since_id = notifications.getIn(['items', 0, 'id']);
}

dispatch(expandNotificationsRequest(isLoadingMore));
Expand Down

0 comments on commit 1c14242

Please sign in to comment.