mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
@urbit/api: update contact pokes
This commit is contained in:
parent
2f70a433bd
commit
d8b8fb3a5f
@ -1,5 +1,5 @@
|
||||
|
||||
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}`
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user