chore: Update onMessage event to include conversation id (#7497)
This commit is contained in:
@@ -25,3 +25,23 @@ export const getExtraSpaceToScroll = () => {
|
||||
|
||||
return extraHeight;
|
||||
};
|
||||
|
||||
export const shouldTriggerMessageUpdateEvent = message => {
|
||||
const { previous_changes: previousChanges } = message;
|
||||
|
||||
if (!previousChanges) {
|
||||
return false;
|
||||
}
|
||||
const hasNotifiableAttributeChanges = Object.keys(previousChanges).includes(
|
||||
'content_attributes'
|
||||
);
|
||||
if (!hasNotifiableAttributeChanges) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const hasSubmittedValueChanges = Object.keys(
|
||||
previousChanges.content_attributes[1] || {}
|
||||
).includes('submitted_values');
|
||||
|
||||
return hasSubmittedValueChanges;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user