When getting a list of message groups, I should get a list of all of the unique message groups that I am a member of. This is because when creating a message group is automatically adds yourself to the group and then you can go and join the group a second time. You shouldn't be able to join a group you are already a member of.
Current Behavior
When getting the list of message groups, some message groups appear twice because you can join the same group multiple times.
Failure Information
For some reason api/rooms/#/groups is returning the same message groups twice. I've determined that this is because I didn't realize that when a message group is created it automatically assumes that the player sending the request should be in the group. Because of this, I have been sending the current player's id in the participants array, thus the user was getting added to the group twice. This made it so that when getting the list of the groups, the same group got returned multiple times because the player is in it twice.
Expected Behavior
When getting a list of message groups, I should get a list of all of the unique message groups that I am a member of. This is because when creating a message group is automatically adds yourself to the group and then you can go and join the group a second time. You shouldn't be able to join a group you are already a member of.
Current Behavior
When getting the list of message groups, some message groups appear twice because you can join the same group multiple times.
Failure Information
For some reason api/rooms/#/groups is returning the same message groups twice. I've determined that this is because I didn't realize that when a message group is created it automatically assumes that the player sending the request should be in the group. Because of this, I have been sending the current player's id in the participants array, thus the user was getting added to the group twice. This made it so that when getting the list of the groups, the same group got returned multiple times because the player is in it twice.
Possible Solution
Should add a check to players who are joining a message group to ensure that you cannot join a group you are already in.
Steps to Reproduce