fix link expansion broken during typing object change
expand all attachments, not just the first
deal with missing user key in some messages
Merge branch 'master' into refactor_to_support_multiple_instances
fix error condition