Skip to content

[IMPROVE] Add an optional rocketchat-protocol DNS entry for Federation#14589

Merged
sampaiodiego merged 3 commits intodevelopfrom
federation/dns-protocol
May 30, 2019
Merged

[IMPROVE] Add an optional rocketchat-protocol DNS entry for Federation#14589
sampaiodiego merged 3 commits intodevelopfrom
federation/dns-protocol

Conversation

@alansikora
Copy link
Copy Markdown
Contributor

@alansikora alansikora self-assigned this May 22, 2019
@sampaiodiego sampaiodiego added this to the 1.2.0 milestone May 22, 2019
// If there is no record, skip
if (!txtRecord) {
throw new Meteor.Error('ENOTFOUND', 'Could not find public key entry on TXT records');
protocol = protocolTxtRecords[0][0].toLowerCase() === 'http' ? 'http' : 'https';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is [0][0] always guaranteed to be here? Should we check here or are we ok with this pattern of just "handling" / ignoring the exception that is thrown?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from node docs it seems to br guaranteed

@sampaiodiego sampaiodiego changed the title Added an optional rocketchat-protocol to the DNS entries [IMPROVE] Add an optional rocketchat-protocol DNS entry for Federation May 30, 2019
@sampaiodiego sampaiodiego merged commit 9193eb1 into develop May 30, 2019
@sampaiodiego sampaiodiego deleted the federation/dns-protocol branch May 30, 2019 19:35
@sampaiodiego sampaiodiego mentioned this pull request Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants