ricochet-im / ricochet

Anonymous peer-to-peer instant messaging
https://ricochet.im/
Other
3.7k stars 400 forks source link

Fix typos and ensure odd-numbered channels have odd numbers #587

Open jes opened 6 years ago

jes commented 6 years ago

The logic in availableOutboundChannelId ensured that when a channel needs an even number, an even number is generated, but it did not ensure that when a channel needs an odd number, an odd number is generated.

It worked anyway, so probably the only time it ever needs an odd-numbered id, the number 1 would do, but it seems right to fix the logic anyway.