goflow icon indicating copy to clipboard operation
goflow copied to clipboard

Add has_attachment rule

Open ericnewcomer opened this issue 5 years ago • 1 comments

I think we have discussed this in the past and apparently not implemented it or recorded that decision, so putting it here.

This is coming from a customer who is trying to route on if the contact uploaded a file. In the past we've forced a text match for /^http.*$/ or somesuch, but believe we were moving away from a text filled with url data at some point.

ericnewcomer avatar May 26 '19 20:05 ericnewcomer

Ok my recollection (since we suck at taking notes in our discussions!) is that we initially decided we would have a has_attachment rule... and its operand should be @input.attachments.. but that would mean that for it to sit in the same switch router as other messagey tests.. we'd need tests to have different operands instead of the idea of a 1 operand -> N cases. We tried that.. and then abandoned it. I think rightly so because it was getting complicated quickly.

So we still need to figure out where such a has_attachment rule would live. Is it on its own router with different test options like has_image, has audio etc, or do we try again to find a way for it to live on the same router as the regular 'wait for message' tests.

rowanseymour avatar May 27 '19 14:05 rowanseymour