This commit is contained in:
mgabdev
2020-05-14 22:31:24 -04:00
parent 8d452f0f6b
commit 59466ccc08
15 changed files with 165 additions and 127 deletions

View File

@@ -189,8 +189,13 @@ export function deleteStatusFail(id, error) {
};
};
export function fetchContext(id) {
export function fetchContext(id, ensureIsReply) {
return (dispatch, getState) => {
if (ensureIsReply) {
const isReply = !!getState().getIn(['statuses', id, 'in_reply_to_id'], null)
if (!isReply) return;
}
dispatch(fetchContextRequest(id));
api(getState).get(`/api/v1/statuses/${id}/context`).then(response => {