From 133f2a565664bd24bc76f61931fe85dd521b572c Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Fri, 30 Aug 2019 01:39:34 -0700 Subject: [PATCH] replace publicSendData with LokiPublicChannelAPI instance --- js/models/conversations.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/js/models/conversations.js b/js/models/conversations.js index fc6f4b85f..9774ef97c 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -1376,7 +1376,7 @@ const options = this.getSendOptions(); options.messageType = message.get('type'); options.isPublic = this.isPublic(); - if (this.isPublic()) { + if (options.isPublic) { options.publicSendData = await this.getPublicSendData(); } @@ -2073,17 +2073,11 @@ const serverAPI = lokiPublicChatAPI.findOrCreateServer( this.get('server') ); - // Can be null if fails - const token = await serverAPI.getOrRefreshServerToken(); const channelAPI = serverAPI.findOrCreateChannel( this.get('channelId'), this.id ); - const publicEndpoint = channelAPI.getEndpoint(); - return { - publicEndpoint, - token, - }; + return channelAPI; }, getModStatus() { if (!this.isPublic()) {