GroupBy and Rule to select the first and third elements based on the second


Let’s say I have a matrix like

m={{1,a,2},{4,b,3},{6,a,8},{7,c,10},{2,c,5}} 

How can I use GroupBy to pick the first and third elements using the second one? I tried

GroupBy[m, #[[2]]&->#[[{1,3}]]&] 

which is apparently wrong.