fix join publicgroups pulls

pull/744/head
Audric Ackermann 5 years ago
parent 432e3a72b9
commit 3f7680ccf7
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -392,9 +392,10 @@ export class LeftPaneChannelSection extends React.Component<Props, State> {
}
private async attemptConnection(serverURL: string, channelId: number) {
const rawserverURL = serverURL
let rawserverURL = serverURL
.replace(/^https?:\/\//i, '')
.replace(/[/\\]+$/i, '');
rawserverURL = rawserverURL.toLowerCase();
const sslServerURL = `https://${rawserverURL}`;
const conversationId = `publicChat:${channelId}@${rawserverURL}`;
@ -423,12 +424,13 @@ export class LeftPaneChannelSection extends React.Component<Props, State> {
'group'
);
await serverAPI.findOrCreateChannel(channelId, conversationId);
await conversation.setPublicSource(sslServerURL, channelId);
await conversation.setFriendRequestStatus(
window.friends.friendRequestStatusEnum.friends
);
conversation.getPublicSendData(); // may want "await" if you want to use the API
return conversation;
}
}

Loading…
Cancel
Save