-
Notifications
You must be signed in to change notification settings - Fork 65
Add SendMessage, ReceiveMessage and RetractMessage to MIX #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Updates MIXJoin Element list of subscriptions to an unordered_set. Remove redundant MIXSubscribe Element. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIXUpdateSubscription Parser and Serializer based on examples in XEP 0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: Ied06269cf329b4fdffdde4ace67ebffa4089fbde
Updates MIXJoin Element list of subscriptions to an unordered_set. Remove redundant MIXSubscribe Element. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Tests added for joining and leaving a channel as in XEP-0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: Ibc2737f6154eeee1a85e98cb5f80c8bdbad35dcd
Add MIXRetract element, its parser and serializer License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for SendMessage, ReceiveMessage and RetractMessage, which passes. Added tests for MIXRetract Parser and Serializer based on examples in XEP 0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: I65555a9129c2eccd632861259be92e2be607ee64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some first round feedback.
| /** | ||
| * Join a MIX channel and subscribe to nodes. | ||
| */ | ||
| virtual void joinChannelAndSubscribe(const JID &channel, const std::unordered_set<std::string>& nodes) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An object which conforms to the MIX interface is supposed to represent a single client <-> MIX channel relation. So the channel is going to be the same for all methods and probably passed in the constructor.
| for (auto node : nodes) { | ||
| joinPayload->addSubscription(node); | ||
| } | ||
| auto request = std::make_shared<GenericRequest<MIXJoin> >(IQ::Set, getJID(), joinPayload, iqRouter_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use >> instead of > >.
|
|
||
| virtual void leaveChannel(const JID &channel) = 0; | ||
|
|
||
| virtual void sendMessage(const JID &channel, const std::string &body) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably take something more flexible than std::string. What if you want to send XHTML-IM.
No description provided.