status-im / status-protocol-go

Status Protocol implementation in Go
Mozilla Public License 2.0
0 stars 1 forks source link

Increase multidevice response when adding new devices #9

Closed cammellos closed 5 years ago

cammellos commented 5 years ago

Steps to replicate

1) Create 1 device A1 2) Create 3 devices A2, A3, A4 3) Create another device B1 4) Send a message from B1 to A 5) A2, A3, A4 should receive the message, A1 should not receive the message 6) Send a message from A1 to B 7) B should receive the message 8) Send a message from B1 to A

Expected: A1 is included Actual: A1 is not included

Description

Currently we use timestamps to decide which device to include (we include maximum 3). The issue is that this timestamp is only changed as the bundles changes, so once every x hours.

Therefore when more than 3 devices are online, we should strive to target those devices that we have seen last (last active devices).

Because of we fetch historical messages, that's not very simple, also we don't want to rely on whisper timestamps.

The solution proposed would be to update the timestamp each time the bundle is propagated, instead of updating only on bundle updates (every x hours).

cammellos commented 5 years ago

Merged in status-react with https://github.com/status-im/status-react/pull/8615