I guess this piece of code is translating a member destination to a list of candidates. But it seems a bit dodgy to me. The message.community.candidates dict contains candidates which are scheduled for cleanup, and hence should not be considered active.
Moreover, what are the benefits of using members instead of candidates?