Details
Description
Where a contact has multiple mobile phone numbers, CiviCRM can choose the 'wrong' one to send a mass SMS to.
This is because \CRM_Mailing_BAO_Mailing::getRecipients does not have an 'order by' clause when selecting which phone number to use.
I think the fix is just to add ORDER BY is_primary DESC.
But the email selection query also has a 'group by' which is missing from the SMS one, so I would like to check the effect this has and I'll put together a PR.