|
|
@ -1,4 +1,4 @@
|
|
|
|
import api from '../api'
|
|
|
|
import api, { getLinks } from '../api'
|
|
|
|
import Immutable from 'immutable';
|
|
|
|
import Immutable from 'immutable';
|
|
|
|
|
|
|
|
|
|
|
|
export const ACCOUNT_SET_SELF = 'ACCOUNT_SET_SELF';
|
|
|
|
export const ACCOUNT_SET_SELF = 'ACCOUNT_SET_SELF';
|
|
|
@ -35,10 +35,18 @@ export const FOLLOWERS_FETCH_REQUEST = 'FOLLOWERS_FETCH_REQUEST';
|
|
|
|
export const FOLLOWERS_FETCH_SUCCESS = 'FOLLOWERS_FETCH_SUCCESS';
|
|
|
|
export const FOLLOWERS_FETCH_SUCCESS = 'FOLLOWERS_FETCH_SUCCESS';
|
|
|
|
export const FOLLOWERS_FETCH_FAIL = 'FOLLOWERS_FETCH_FAIL';
|
|
|
|
export const FOLLOWERS_FETCH_FAIL = 'FOLLOWERS_FETCH_FAIL';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const FOLLOWERS_EXPAND_REQUEST = 'FOLLOWERS_EXPAND_REQUEST';
|
|
|
|
|
|
|
|
export const FOLLOWERS_EXPAND_SUCCESS = 'FOLLOWERS_EXPAND_SUCCESS';
|
|
|
|
|
|
|
|
export const FOLLOWERS_EXPAND_FAIL = 'FOLLOWERS_EXPAND_FAIL';
|
|
|
|
|
|
|
|
|
|
|
|
export const FOLLOWING_FETCH_REQUEST = 'FOLLOWING_FETCH_REQUEST';
|
|
|
|
export const FOLLOWING_FETCH_REQUEST = 'FOLLOWING_FETCH_REQUEST';
|
|
|
|
export const FOLLOWING_FETCH_SUCCESS = 'FOLLOWING_FETCH_SUCCESS';
|
|
|
|
export const FOLLOWING_FETCH_SUCCESS = 'FOLLOWING_FETCH_SUCCESS';
|
|
|
|
export const FOLLOWING_FETCH_FAIL = 'FOLLOWING_FETCH_FAIL';
|
|
|
|
export const FOLLOWING_FETCH_FAIL = 'FOLLOWING_FETCH_FAIL';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const FOLLOWING_EXPAND_REQUEST = 'FOLLOWING_EXPAND_REQUEST';
|
|
|
|
|
|
|
|
export const FOLLOWING_EXPAND_SUCCESS = 'FOLLOWING_EXPAND_SUCCESS';
|
|
|
|
|
|
|
|
export const FOLLOWING_EXPAND_FAIL = 'FOLLOWING_EXPAND_FAIL';
|
|
|
|
|
|
|
|
|
|
|
|
export const RELATIONSHIPS_FETCH_REQUEST = 'RELATIONSHIPS_FETCH_REQUEST';
|
|
|
|
export const RELATIONSHIPS_FETCH_REQUEST = 'RELATIONSHIPS_FETCH_REQUEST';
|
|
|
|
export const RELATIONSHIPS_FETCH_SUCCESS = 'RELATIONSHIPS_FETCH_SUCCESS';
|
|
|
|
export const RELATIONSHIPS_FETCH_SUCCESS = 'RELATIONSHIPS_FETCH_SUCCESS';
|
|
|
|
export const RELATIONSHIPS_FETCH_FAIL = 'RELATIONSHIPS_FETCH_FAIL';
|
|
|
|
export const RELATIONSHIPS_FETCH_FAIL = 'RELATIONSHIPS_FETCH_FAIL';
|
|
|
@ -46,7 +54,7 @@ export const RELATIONSHIPS_FETCH_FAIL = 'RELATIONSHIPS_FETCH_FAIL';
|
|
|
|
export function setAccountSelf(account) {
|
|
|
|
export function setAccountSelf(account) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_SET_SELF,
|
|
|
|
type: ACCOUNT_SET_SELF,
|
|
|
|
account: account
|
|
|
|
account
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -101,22 +109,22 @@ export function expandAccountTimeline(id) {
|
|
|
|
export function fetchAccountRequest(id) {
|
|
|
|
export function fetchAccountRequest(id) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_FETCH_REQUEST,
|
|
|
|
type: ACCOUNT_FETCH_REQUEST,
|
|
|
|
id: id
|
|
|
|
id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchAccountSuccess(account) {
|
|
|
|
export function fetchAccountSuccess(account) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_FETCH_SUCCESS,
|
|
|
|
type: ACCOUNT_FETCH_SUCCESS,
|
|
|
|
account: account
|
|
|
|
account
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchAccountFail(id, error) {
|
|
|
|
export function fetchAccountFail(id, error) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_FETCH_FAIL,
|
|
|
|
type: ACCOUNT_FETCH_FAIL,
|
|
|
|
id: id,
|
|
|
|
id,
|
|
|
|
error: error
|
|
|
|
error
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -147,89 +155,89 @@ export function unfollowAccount(id) {
|
|
|
|
export function followAccountRequest(id) {
|
|
|
|
export function followAccountRequest(id) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_FOLLOW_REQUEST,
|
|
|
|
type: ACCOUNT_FOLLOW_REQUEST,
|
|
|
|
id: id
|
|
|
|
id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function followAccountSuccess(relationship) {
|
|
|
|
export function followAccountSuccess(relationship) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_FOLLOW_SUCCESS,
|
|
|
|
type: ACCOUNT_FOLLOW_SUCCESS,
|
|
|
|
relationship: relationship
|
|
|
|
relationship
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function followAccountFail(error) {
|
|
|
|
export function followAccountFail(error) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_FOLLOW_FAIL,
|
|
|
|
type: ACCOUNT_FOLLOW_FAIL,
|
|
|
|
error: error
|
|
|
|
error
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function unfollowAccountRequest(id) {
|
|
|
|
export function unfollowAccountRequest(id) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_UNFOLLOW_REQUEST,
|
|
|
|
type: ACCOUNT_UNFOLLOW_REQUEST,
|
|
|
|
id: id
|
|
|
|
id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function unfollowAccountSuccess(relationship) {
|
|
|
|
export function unfollowAccountSuccess(relationship) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_UNFOLLOW_SUCCESS,
|
|
|
|
type: ACCOUNT_UNFOLLOW_SUCCESS,
|
|
|
|
relationship: relationship
|
|
|
|
relationship
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function unfollowAccountFail(error) {
|
|
|
|
export function unfollowAccountFail(error) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_UNFOLLOW_FAIL,
|
|
|
|
type: ACCOUNT_UNFOLLOW_FAIL,
|
|
|
|
error: error
|
|
|
|
error
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchAccountTimelineRequest(id) {
|
|
|
|
export function fetchAccountTimelineRequest(id) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_TIMELINE_FETCH_REQUEST,
|
|
|
|
type: ACCOUNT_TIMELINE_FETCH_REQUEST,
|
|
|
|
id: id
|
|
|
|
id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchAccountTimelineSuccess(id, statuses, replace) {
|
|
|
|
export function fetchAccountTimelineSuccess(id, statuses, replace) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_TIMELINE_FETCH_SUCCESS,
|
|
|
|
type: ACCOUNT_TIMELINE_FETCH_SUCCESS,
|
|
|
|
id: id,
|
|
|
|
id,
|
|
|
|
statuses: statuses,
|
|
|
|
statuses,
|
|
|
|
replace: replace
|
|
|
|
replace
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchAccountTimelineFail(id, error) {
|
|
|
|
export function fetchAccountTimelineFail(id, error) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_TIMELINE_FETCH_FAIL,
|
|
|
|
type: ACCOUNT_TIMELINE_FETCH_FAIL,
|
|
|
|
id: id,
|
|
|
|
id,
|
|
|
|
error: error
|
|
|
|
error
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function expandAccountTimelineRequest(id) {
|
|
|
|
export function expandAccountTimelineRequest(id) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_TIMELINE_EXPAND_REQUEST,
|
|
|
|
type: ACCOUNT_TIMELINE_EXPAND_REQUEST,
|
|
|
|
id: id
|
|
|
|
id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function expandAccountTimelineSuccess(id, statuses) {
|
|
|
|
export function expandAccountTimelineSuccess(id, statuses) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_TIMELINE_EXPAND_SUCCESS,
|
|
|
|
type: ACCOUNT_TIMELINE_EXPAND_SUCCESS,
|
|
|
|
id: id,
|
|
|
|
id,
|
|
|
|
statuses: statuses
|
|
|
|
statuses
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function expandAccountTimelineFail(id, error) {
|
|
|
|
export function expandAccountTimelineFail(id, error) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_TIMELINE_EXPAND_FAIL,
|
|
|
|
type: ACCOUNT_TIMELINE_EXPAND_FAIL,
|
|
|
|
id: id,
|
|
|
|
id,
|
|
|
|
error: error
|
|
|
|
error
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -260,42 +268,42 @@ export function unblockAccount(id) {
|
|
|
|
export function blockAccountRequest(id) {
|
|
|
|
export function blockAccountRequest(id) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_BLOCK_REQUEST,
|
|
|
|
type: ACCOUNT_BLOCK_REQUEST,
|
|
|
|
id: id
|
|
|
|
id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function blockAccountSuccess(relationship) {
|
|
|
|
export function blockAccountSuccess(relationship) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_BLOCK_SUCCESS,
|
|
|
|
type: ACCOUNT_BLOCK_SUCCESS,
|
|
|
|
relationship: relationship
|
|
|
|
relationship
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function blockAccountFail(error) {
|
|
|
|
export function blockAccountFail(error) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_BLOCK_FAIL,
|
|
|
|
type: ACCOUNT_BLOCK_FAIL,
|
|
|
|
error: error
|
|
|
|
error
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function unblockAccountRequest(id) {
|
|
|
|
export function unblockAccountRequest(id) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_UNBLOCK_REQUEST,
|
|
|
|
type: ACCOUNT_UNBLOCK_REQUEST,
|
|
|
|
id: id
|
|
|
|
id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function unblockAccountSuccess(relationship) {
|
|
|
|
export function unblockAccountSuccess(relationship) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_UNBLOCK_SUCCESS,
|
|
|
|
type: ACCOUNT_UNBLOCK_SUCCESS,
|
|
|
|
relationship: relationship
|
|
|
|
relationship
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function unblockAccountFail(error) {
|
|
|
|
export function unblockAccountFail(error) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: ACCOUNT_UNBLOCK_FAIL,
|
|
|
|
type: ACCOUNT_UNBLOCK_FAIL,
|
|
|
|
error: error
|
|
|
|
error
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -304,7 +312,9 @@ export function fetchFollowers(id) {
|
|
|
|
dispatch(fetchFollowersRequest(id));
|
|
|
|
dispatch(fetchFollowersRequest(id));
|
|
|
|
|
|
|
|
|
|
|
|
api(getState).get(`/api/v1/accounts/${id}/followers`).then(response => {
|
|
|
|
api(getState).get(`/api/v1/accounts/${id}/followers`).then(response => {
|
|
|
|
dispatch(fetchFollowersSuccess(id, response.data));
|
|
|
|
const prev = getLinks(response).refs.find(link => link.rel === 'prev').uri;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(fetchFollowersSuccess(id, response.data, prev));
|
|
|
|
dispatch(fetchRelationships(response.data.map(item => item.id)));
|
|
|
|
dispatch(fetchRelationships(response.data.map(item => item.id)));
|
|
|
|
}).catch(error => {
|
|
|
|
}).catch(error => {
|
|
|
|
dispatch(fetchFollowersFail(id, error));
|
|
|
|
dispatch(fetchFollowersFail(id, error));
|
|
|
@ -315,23 +325,65 @@ export function fetchFollowers(id) {
|
|
|
|
export function fetchFollowersRequest(id) {
|
|
|
|
export function fetchFollowersRequest(id) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: FOLLOWERS_FETCH_REQUEST,
|
|
|
|
type: FOLLOWERS_FETCH_REQUEST,
|
|
|
|
id: id
|
|
|
|
id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchFollowersSuccess(id, accounts) {
|
|
|
|
export function fetchFollowersSuccess(id, accounts, prev) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: FOLLOWERS_FETCH_SUCCESS,
|
|
|
|
type: FOLLOWERS_FETCH_SUCCESS,
|
|
|
|
id: id,
|
|
|
|
id,
|
|
|
|
accounts: accounts
|
|
|
|
accounts,
|
|
|
|
|
|
|
|
prev
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchFollowersFail(id, error) {
|
|
|
|
export function fetchFollowersFail(id, error) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: FOLLOWERS_FETCH_FAIL,
|
|
|
|
type: FOLLOWERS_FETCH_FAIL,
|
|
|
|
id: id,
|
|
|
|
id,
|
|
|
|
error: error
|
|
|
|
error
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function expandFollowers(id) {
|
|
|
|
|
|
|
|
return (dispatch, getState) => {
|
|
|
|
|
|
|
|
const url = getState().getIn(['user_lists', 'followers', id, 'prev']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(expandFollowersRequest(id));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
api(getState).get(url).then(response => {
|
|
|
|
|
|
|
|
const prev = getLinks(response).refs.find(link => link.rel === 'prev').uri;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(expandFollowersSuccess(id, response.data, prev));
|
|
|
|
|
|
|
|
dispatch(fetchRelationships(response.data.map(item => item.id)));
|
|
|
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
|
|
|
dispatch(expandFollowersFail(id, error));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function expandFollowersRequest(id) {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
type: FOLLOWERS_EXPAND_REQUEST,
|
|
|
|
|
|
|
|
id
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function expandFollowersSuccess(id, accounts, prev) {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
type: FOLLOWERS_EXPAND_SUCCESS,
|
|
|
|
|
|
|
|
id,
|
|
|
|
|
|
|
|
accounts,
|
|
|
|
|
|
|
|
prev
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function expandFollowersFail(id, error) {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
type: FOLLOWERS_EXPAND_FAIL,
|
|
|
|
|
|
|
|
id,
|
|
|
|
|
|
|
|
error
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -351,23 +403,64 @@ export function fetchFollowing(id) {
|
|
|
|
export function fetchFollowingRequest(id) {
|
|
|
|
export function fetchFollowingRequest(id) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: FOLLOWING_FETCH_REQUEST,
|
|
|
|
type: FOLLOWING_FETCH_REQUEST,
|
|
|
|
id: id
|
|
|
|
id
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchFollowingSuccess(id, accounts) {
|
|
|
|
export function fetchFollowingSuccess(id, accounts) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: FOLLOWING_FETCH_SUCCESS,
|
|
|
|
type: FOLLOWING_FETCH_SUCCESS,
|
|
|
|
id: id,
|
|
|
|
id,
|
|
|
|
accounts: accounts
|
|
|
|
accounts
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchFollowingFail(id, error) {
|
|
|
|
export function fetchFollowingFail(id, error) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: FOLLOWING_FETCH_FAIL,
|
|
|
|
type: FOLLOWING_FETCH_FAIL,
|
|
|
|
id: id,
|
|
|
|
id,
|
|
|
|
error: error
|
|
|
|
error
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function expandFollowing(id) {
|
|
|
|
|
|
|
|
return (dispatch, getState) => {
|
|
|
|
|
|
|
|
const url = getState().getIn(['user_lists', 'following', id, 'prev']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(expandFollowingRequest(id));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
api(getState).get(url).then(response => {
|
|
|
|
|
|
|
|
const prev = getLinks(response).refs.find(link => link.rel === 'prev').uri;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(expandFollowingSuccess(id, response.data, prev));
|
|
|
|
|
|
|
|
dispatch(fetchRelationships(response.data.map(item => item.id)));
|
|
|
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
|
|
|
dispatch(expandFollowingFail(id, error));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function expandFollowingRequest(id) {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
type: FOLLOWING_EXPAND_REQUEST,
|
|
|
|
|
|
|
|
id
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function expandFollowingSuccess(id, accounts, prev) {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
type: FOLLOWING_EXPAND_SUCCESS,
|
|
|
|
|
|
|
|
id,
|
|
|
|
|
|
|
|
accounts,
|
|
|
|
|
|
|
|
prev
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function expandFollowingFail(id, error) {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
type: FOLLOWING_EXPAND_FAIL,
|
|
|
|
|
|
|
|
id,
|
|
|
|
|
|
|
|
error
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -386,20 +479,20 @@ export function fetchRelationships(account_ids) {
|
|
|
|
export function fetchRelationshipsRequest(ids) {
|
|
|
|
export function fetchRelationshipsRequest(ids) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: RELATIONSHIPS_FETCH_REQUEST,
|
|
|
|
type: RELATIONSHIPS_FETCH_REQUEST,
|
|
|
|
ids: ids
|
|
|
|
ids
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchRelationshipsSuccess(relationships) {
|
|
|
|
export function fetchRelationshipsSuccess(relationships) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: RELATIONSHIPS_FETCH_SUCCESS,
|
|
|
|
type: RELATIONSHIPS_FETCH_SUCCESS,
|
|
|
|
relationships: relationships
|
|
|
|
relationships
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export function fetchRelationshipsFail(error) {
|
|
|
|
export function fetchRelationshipsFail(error) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
type: RELATIONSHIPS_FETCH_FAIL,
|
|
|
|
type: RELATIONSHIPS_FETCH_FAIL,
|
|
|
|
error: error
|
|
|
|
error
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|