@bobjonkman It was pretty simple, but hacky. There's no current method of #WebFinger discovery for groups, so it iterates the locally known groups with the same 'nickname' and then joins the (first) one that has the same nickname and has its "mainpage" (in all known cases the group's HTML URL) on the same server as after the '@' + the poster is a member.
This shouldn't cause issues because people don't join malicious groups. Because people always do the right thing. Right?