I've done the same thing; came here looking for a solution. I had selected my friend to add him to a group and then started typing in chat. It selected both attack and confirm while I was typing and we couldn't sail out of the range fast enough. I am now tagged as a pirate. There is no way I want to have to start again, we didn't even exchange any fire in the battle. We both just sailed away and let the timer run out to leave.
Well there needs to be work done to sort this out immediately. The pirate faction already apparent has the highest population. Plus I do not want to have to restart seven days worth of grind because the game decided to make me attack a friend because I started typing.