bug fix: send private value in topic creation
This commit is contained in:
+5
-6
@@ -890,7 +890,7 @@
|
||||
}
|
||||
ctx.imageSmoothingEnabled = true;
|
||||
ctx.drawImage(this, sx, sy, size, size, 0, 0, canvas.width, canvas.height);
|
||||
var bits = canvas.toDataURL("image/jpg");
|
||||
var bits = canvas.toDataURL("image/jpeg");
|
||||
canvas = null;
|
||||
|
||||
instance.setState({dataUrl: bits});
|
||||
@@ -1651,8 +1651,8 @@
|
||||
this.props.onCreateTopic(sel, undefined);
|
||||
}
|
||||
},
|
||||
handleGroupSubmit: function(name, dataUrl) {
|
||||
this.props.onCreateTopic(undefined, vcard(name, dataUrl));
|
||||
handleGroupSubmit: function(name, dataUrl, priv) {
|
||||
this.props.onCreateTopic(undefined, vcard(name, dataUrl), priv);
|
||||
},
|
||||
handleGroupSubscribe: function(topicName) {
|
||||
this.props.onCreateTopic(topicName);
|
||||
@@ -3120,14 +3120,13 @@
|
||||
this.setState({sidePanelSelected: 'new-topic'});
|
||||
},
|
||||
// Create of a new topic. New P2P topic requires peer's name.
|
||||
handleNewTopicRequest: function(peerName, pub) {
|
||||
handleNewTopicRequest: function(peerName, pub, priv) {
|
||||
var instance = this;
|
||||
|
||||
var topic = peerName ? Tinode.newTopicWith(peerName) : Tinode.newTopic();
|
||||
var query = topic.startMetaQuery().withDesc().withSub().withData();
|
||||
var setParams;
|
||||
if (!peerName) {
|
||||
setParams = {desc: {public: pub}};
|
||||
setParams = {desc: {public: pub, private: priv}};
|
||||
}
|
||||
|
||||
topic.subscribe(query.build(), setParams).then(function() {
|
||||
|
||||
Reference in New Issue
Block a user