A note about the test: there's a factory.makeDivergedTranslationMessage for creating diverged messages.
About the fix itself: approveSuggestion could be used very intensively, so for performance it may be worth shortcutting the getCurrentTranslation call (which queries the database) in cases where the message is diverged. In those cases, there's no chance of it being shadowed by another diverged message.
Thanks for fixing that—the mistake was mine!
A note about the test: there's a factory. makeDivergedTra nslationMessage for creating diverged messages.
About the fix itself: approveSuggestion could be used very intensively, so for performance it may be worth shortcutting the getCurrentTrans lation call (which queries the database) in cases where the message is diverged. In those cases, there's no chance of it being shadowed by another diverged message.