update contact pokes
-import { Path, Patp, Poke, resourceAsPath } from "../lib";
+import { Path, Patp, Poke, resourceAsPath, Scry } from "../lib";
import {
Contact,
ContactUpdateAdd,
@@ -38,7 +38,7 @@ export const removeContact = (ship: Patp): Poke<ContactUpdateRemove> =>
export const share = (recipient: Patp, version: number = CONTACT_UPDATE_VERSION): Poke<ContactShare> => ({
app: "contact-push-hook",
- mark: `contact-update-${version}`,
+ mark: "contact-share",
json: { share: recipient },
});
@@ -94,3 +94,16 @@ export const retrieve = (
}
};
}
+
+export const fetchIsAllowed = (
+ entity: string,
+ name: string,
+ ship: string,
+ personal: boolean
+): Scry => {
+ const isPersonal = personal ? 'true' : 'false';
+ return {
+ app: 'contact-store',
+ path: `/is-allowed/${entity}/${name}/${ship}/${isPersonal}`
+ }
+};
