magic-wormhole / magic-wormhole.rs

Rust implementation of Magic Wormhole, with new features and enhancements
European Union Public License 1.2
752 stars 80 forks source link

Rendezvous: make Welcome.motd optional #18

Closed warner closed 6 years ago

warner commented 6 years ago

The new parser for Welcome messages requires the motd field to be present, but this is optional (and in fact the server only includes one if the server operator wants to broadcast a message to all users, like a service interruption announcement or a plea for donations to cover hosting costs). So the serde_json parser needs to make this optional. (in fact pretty much everything in the Welcome message is optional).

This currently causes a panic in core/examples/ws, which connects to a (local) relay and prints the messages that it receives. The motd-less Welcome triggers an error.

warner commented 6 years ago

@vu3rdd can you grab this one?