Store Meta-Atoms of fetchPersonas action
@@ -4,7 +4,7 @@ import { actionTypes } from "../actions/actions.js";
import * as atomUtils from "./utils/atom-utils.js";
import * as processUtils from "./utils/process-utils.js";
import { parseMetaAtom } from "../reducers/atom-reducer/parse-atom.js";
-import { is, get, getIn, numOfEvts2pageSize } from "../utils.js";
+import { get, getIn, is, numOfEvts2pageSize } from "../utils.js";
import won from "../won-es6";
export function fetchOwnedData(dispatch, getState) {
@@ -194,6 +194,20 @@ export function fetchAtomAndDispatch(
});
}
+export function fetchPersonas(dispatch /*, getState,*/) {
+ return ownerApi.getAllActiveMetaPersonas().then(atoms => {
+ const atomsImm = Immutable.fromJS(atoms);
+ const atomUris = [...atomsImm.keys()];
+
+ dispatch({
+ type: actionTypes.atoms.storeMetaAtoms,
+ payload: Immutable.fromJS({ metaAtoms: atoms }),
+ });
+
+ return atomUris;
+ });
+}
+
export function fetchWhatsNew(
dispatch,
getState,
