I have written a makeMsg function but I don\'t like it - it just seems really un-Scala-ish to discriminate based on Option.isDefined. Can you make it better?
Canonical Scala that does not require the text field to know to cleverly disappear when it's empty:
t.map(s => ).getOrElse( )
You should think about using this pattern whenever you have an option but need to use something that doesn't know about options. (In this case, Easy Angel has found a more compact solution where it does know about options or something like them.)