summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Whiteboard/OutgoingWhiteboardSession.cpp')
-rw-r--r--Swiften/Whiteboard/OutgoingWhiteboardSession.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swiften/Whiteboard/OutgoingWhiteboardSession.cpp b/Swiften/Whiteboard/OutgoingWhiteboardSession.cpp
index c527942..63e4476 100644
--- a/Swiften/Whiteboard/OutgoingWhiteboardSession.cpp
+++ b/Swiften/Whiteboard/OutgoingWhiteboardSession.cpp
@@ -42,6 +42,7 @@ namespace Swift {
WhiteboardOperation::ref op = server.handleClientOperationReceived(operation);
onOperationReceived(op);
+ lastOpID = op->getID();
WhiteboardPayload::ref payload = boost::make_shared<WhiteboardPayload>();
payload->setOperation(op);
@@ -49,6 +50,10 @@ namespace Swift {
}
void OutgoingWhiteboardSession::sendOperation(WhiteboardOperation::ref operation) {
+ operation->setID(getClientID()+idGenerator.generateID());
+ operation->setParentID(lastOpID);
+ lastOpID = operation->getID();
+
server.handleLocalOperationReceived(operation);
WhiteboardPayload::ref payload = boost::make_shared<WhiteboardPayload>();
payload->setOperation(operation);