Implements helper function isHintMessage in message-utils.js
*/
import won from "./won-es6.js";
+import { get } from "./utils.js";
/**
* Determines if a given message can be Proposed
@@ -281,6 +282,10 @@ export function isMessageAgreement(msg) {
return isMessageAccepted(msg) && !isMessageCancellationPending(msg);
}
+export function isHintMessage(msg) {
+ return get(msg, "messageType") === won.WONMSG.hintMessage;
+}
+
/**
* Returns the own-messageUri for the given messageUri, this is due to the fact that referenced messages are
* referenced by a messageUri that is not necessarily the owned messageUri, since our state maps are based
