Provide stronger JID types in xmpp::Event
The current API makes it easy to mix different kinds of JIDs as long as they are of the same type. For example, a BareJid
can be a MUC chatroom, or a normal user.
We have made some progress lately:
- we have introduced typed JIDs in #204 as well as correct conversion methods and additional helpers
- we have fixed a correctness bug in #200 that made it possible to cast a Jid/FullJid into a BareJid (dropping the resource implicitly)
Now we can provide stronger types across the xmpp::Event enum. The first obvious candidate is the type RoomNick
which currently aliases to String
but should alias to ResourcePart
. Here's a list of stuff we can do, that i will update:
-
RoomNick
should be alias forResourcePart
-
MucRoom
should be a type that implementsAsRef<BareJid>
-
MucParticipant
should be a type that implementsAsRef<FullJid>