From 78e91abcb440df3895166e8b986196eeef53f61e Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 15 Oct 2020 18:37:04 +0300 Subject: [PATCH] pim-types: add a function to get group membership. --- src/pim-types.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pim-types.ts b/src/pim-types.ts index 9f30b85..ea0f846 100644 --- a/src/pim-types.ts +++ b/src/pim-types.ts @@ -389,4 +389,8 @@ export class ContactType implements PimType { const kind = this.comp.getFirstPropertyValue("kind"); return ["group", "organization"].includes(kind); } + + get members() { + return this.comp.getAllProperties("member").map((prop) => prop.getFirstValue().replace("urn:uuid:", "")); + } }