Adds helper util functions to need-utils
+import won from "./won-es6.js";
+
/**
* Created by fsuda on 08.11.2018.
*/
@@ -28,6 +30,22 @@ export function isDirectResponseNeed(need) {
);
}
+export function hasChatFacet(need) {
+ return (
+ need &&
+ need.get("facets") &&
+ need.get("facets").contains(won.WON.ChatFacetCompacted)
+ );
+}
+
+export function hasGroupFacet(need) {
+ return (
+ need &&
+ need.get("facets") &&
+ need.get("facets").contains(won.WON.GroupFacetCompacted)
+ );
+}
+
/**
* Determines if a given need is a Search-Need (see draft in create-search.js)
* @param msg
