Adds util method to see if a need is a direct response need
@@ -13,6 +13,17 @@ export function isWhatsAroundNeed(need) {
);
}
+/**
+ * Determines if a given need is a DirectResponse-Need
+ * @param msg
+ * @returns {*|boolean}
+ */
+export function isDirectResponseNeed(need) {
+ return (
+ need && need.get("flags") && need.get("flags").contains("won:responseToUri")
+ );
+}
+
/**
* Determines if a given need is a WhatsNew-Need
* @param msg
