Closed XangelMusic closed 1 year ago
I made some changes to the code, but that's not all. We've talked about it on Discord but I'll mention it here: I don't think pairs should have a parent channel since both of them are parents, instead parent should be an empty string and both channels in the pair should be in the children array. Don't forget to sort children with sort.Strings
https://pkg.go.dev/sort#Strings function before adding them to the database and also don't forget to sort them before comparing them to figure out whether such a pair already exists (the whole point of sorting).
Another thing, I wonder if it's better to use an enum instead of an isPair boolean to maybe make adding more support to group types in the future easier. In any case, if we're keeping the boolean, then it should be called is_pair
in the database.
Added modifications and methods to accommodate the new crosspost pair feature. Included documentation for most group commands.