From 60262291ce46c54d24df6242fe7711d10736d59a Mon Sep 17 00:00:00 2001 From: or-else Date: Wed, 28 Mar 2018 11:31:51 -0700 Subject: [PATCH] tags can now be added to group topics --- index.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 01cb92bd..b834e70e 100644 --- a/index.html +++ b/index.html @@ -2089,8 +2089,8 @@ this.props.onCreateTopic(sel, undefined); } }, - handleNewGroupSubmit: function(name, dataUrl, priv) { - this.props.onCreateTopic(undefined, vcard(name, dataUrl), priv); + handleNewGroupSubmit: function(name, dataUrl, priv, tags) { + this.props.onCreateTopic(undefined, vcard(name, dataUrl), priv, tags); }, handleGroupByID: function(topicName) { this.props.onCreateTopic(topicName); @@ -2149,14 +2149,15 @@ handleImageChanged: function(img) { this.setState({imageDataUrl: img}); }, - handleTagsUpdated: function(tags) { + handleTagsChanged: function(tags) { this.setState({tags: tags}); }, handleSubmit: function(e) { e.preventDefault(); if (this.state.fn && this.state.fn.trim()) { this.props.onSubmit(this.state.fn.trim(), - this.state.imageDataUrl, this.state.private.trim()); + this.state.imageDataUrl, this.state.private.trim(), + this.state.tags); } }, render: function() { @@ -2181,8 +2182,9 @@ onImageChanged={this.handleImageChanged} />
@@ -3887,13 +3889,13 @@ this.setState({sidePanelSelected: 'new-topic'}); }, // Create of a new topic. New P2P topic requires peer's name. - handleNewTopicRequest: function(peerName, pub, priv) { + handleNewTopicRequest: function(peerName, pub, priv, tags) { 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, private: priv}}; + setParams = {desc: {public: pub, private: priv}, tags: tags}; } topic.subscribe(query.build(), setParams).then(function() {