I would prefer to see the code only do one emitWhenListener and instead have different setup of the activity data based on dataType, and if not the url share case, then do the urlParts work and setup of the larger to, subject, etc activity data in an else branch, then have one emitWhenListener that uses an activityData object setup by the dataType branching.

It would also be good to explore what dataType the other activities send now: is it enough to just branch on dataType or do we need to also qualify the check with activityName == 'share'? Have to run, otherwise would check myself.