log when no contact so sync, and do not include ourself as contact

pull/1137/head
Audric Ackermann 5 years ago
parent 9d2ddadf1b
commit a543421cdf
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -597,7 +597,11 @@ module.exports = {
await app.client.element(ConversationPage.globeButtonSection).click();
await app.client.element(ConversationPage.joinOpenGroupButton).click();
await this.setValueWrapper(app, ConversationPage.openGroupInputUrl, openGroupUrl);
await this.setValueWrapper(
app,
ConversationPage.openGroupInputUrl,
openGroupUrl
);
await app.client
.element(ConversationPage.openGroupInputUrl)
.getValue()
@ -640,7 +644,8 @@ module.exports = {
const found = renderLogs.some(log => log.message.includes(str));
// eslint-disable-next-line no-unused-expressions
chai.expect(found, `'${str}' not found in logs but was expected`).to.be.true;
chai.expect(found, `'${str}' not found in logs but was expected`).to.be
.true;
},
// async killStubSnodeServer() {

@ -53,11 +53,19 @@ describe('Link Device', function() {
// get logs at this stage (getRenderProcessLogs() clears the app logs)
const secondaryRenderLogs = await app2.client.getRenderProcessLogs();
// pairing request message sent from secondary to primary pubkey
await common.logsContains(secondaryRenderLogs, `Sending pairing-request:pairing-request message to ${common.TEST_PUBKEY1}`);
await common.logsContains(
secondaryRenderLogs,
`Sending pairing-request:pairing-request message to ${
common.TEST_PUBKEY1
}`
);
const primaryRenderLogs = await app.client.getRenderProcessLogs();
// primary grant pairing request
await common.logsContains(primaryRenderLogs, 'Sending pairing-request:pairing-request message to OUR SECONDARY PUBKEY');
await common.logsContains(
primaryRenderLogs,
'Sending pairing-request:pairing-request message to OUR SECONDARY PUBKEY'
);
// no friends, no closed groups, no open groups. we should see those message sync in the log
await common.logsContains(primaryRenderLogs, 'No closed group to sync.');

@ -25,11 +25,19 @@ describe('Open groups', function() {
});
it('openGroup: works with valid open group url', async () => {
await common.joinOpenGroup(app, common.VALID_GROUP_URL, common.VALID_GROUP_NAME);
await common.joinOpenGroup(
app,
common.VALID_GROUP_URL,
common.VALID_GROUP_NAME
);
});
it('openGroup: cannot join two times the same open group', async () => {
await common.joinOpenGroup(app, common.VALID_GROUP_URL2, common.VALID_GROUP_NAME2);
await common.joinOpenGroup(
app,
common.VALID_GROUP_URL2,
common.VALID_GROUP_NAME2
);
// adding a second time the same open group
await app.client.element(ConversationPage.globeButtonSection).click();

@ -666,9 +666,15 @@ MessageSender.prototype = {
}
// Extract required contacts information out of conversations
const sessionContacts = conversations.filter(
c => c.isPrivate() && !c.isSecondaryDevice() && c.isFriend()
c =>
c.isPrivate() &&
!c.isSecondaryDevice() &&
c.isFriend() &&
!c.isOurLocalDevice()
);
if (sessionContacts.length === 0) {
window.console.info('No contacts to sync.');
return Promise.resolve();
}
// We need to sync across 3 contacts at a time

Loading…
Cancel
Save