ticket:5 final with tests
Merge branch 't5_friend_priority'