During the process of writing a C++ implementation of RFC 43/ZYREv3, I've encountered a minor instance of undefined behaviour in the specification; namely, it is not defined whether or not a peer must first join a group in order to send a message to other peers participating in the group. The specification does not provide an affirmative or negative response to this question, leaving it up to the implementor's interpretation.
I can see valid use cases for both variants, but they also have their own drawbacks. I'm hoping that this issue can raise the topic, open discussions, and hopefully result in a clear answer being added to the specification.
Alternative 1 - A peer MAY join a group before sending messages to it
In this alternative, it is not a requirement that a peer joins a group before sending messages to it. Each peer does not need to filter messages after the fact if it only wishes to send messages and not receive them, and fewer network messages need to be transmitted (some of which almost assuredly would simply be dropped by send-only peers).
On the flip side, it may be unexpected or surprising behaviour to receive a shouted message from a node that is not part of the group. Some applications may rely on knowing the full set of nodes that participate in a group, be they uni- or bidirectional in the conversation.
Only minor alterations to the specification would be required in this alternative, as it is merely lacking clarifying language.
Alternative 2 - A peer MUST join a group before sending messages to it
In this alternative, it is an absolute requirement that a peer joins a group before sending messages to it, thereby broadcasting its intent to participate in it. As the specification is written today, no indication is given that this is the correct interpretation, but it is nevertheless an option. This interpretation would mean additional network messages may be sent to peers which have no actual interest in them, and moves the responsibility of filtering out unwanted messages into the application layer.
However, this also means that participation in a group is clearly and explicitly established by all participants, regardless of whether they wish to utilize uni- or bidirectional communication. Applications can rely on the fact that a message arriving via shout must also originate from a peer in one of the groups they participate in.
This would mean addition of more restrictive language to the specification, and other sections may need to be updated to reflect this. Should peers that attempt to send messages to groups they are not participating in be considered invalid and subsequently disconnected, for example?
Opinions
In my opinion, the correct interpretation of the specification as written is Alternative 1, and probably also the most versatile option. Applications can configure their participation with more granularity, and less network bandwidth is likely to be wasted on peers that do not wish to receive messages in the first place. I also think that an applications designed to rely on all potentially speaking peers in a group being known sounds like problems waiting to happen, but you never know - there may be appropriate use cases for this.