Participants: kick pending contacts
Fixes urbit/landscape#269
@@ -286,8 +286,15 @@ function Participant(props: {
const onKick = useCallback(async () => {
const resource = resourceFromPath(association.group);
+ if(contact.pending) {
+ await api.groups.changePolicy(
+ resource,
+ { invite: { removeInvites: [`~${contact.patp}`] } }
+ );
+ } else {
await api.groups.remove(resource, [`~${contact.patp}`]);
- }, [api, association]);
+ }
+ }, [api, contact, association]);
const avatar =
contact?.avatar !== null && !hideAvatars ? (
