Unsubscribe from identity contracts after leaving group #1672
Labels
App:Frontend
Kind:Bug
Kind:Core
Anything that changes or affects the fundamental core data structures & design of the application.
Kind:Enhancement
Improvements, new features, performance upgrades, etc.
Note:Contracts
Issues involving modifications to contracts
Problem
If we are kicked out of a group, or if we leave a group, we remain subscribed to the identity contracts that were in that group.
This is a waste of resources if we are no longer interacting with these contracts.
Solution
For all of the identity contracts with whom we do not have any open DMs, unsubscribe from them.
Note: the
e2e-protocol
branch is merging themailbox.js
contract into theidentity.js
contract. So for this PR do not worry about unsubscribing from the corresponding mailbox contracts. Just unsubscribe from the identity contracts with whom we do not have any other open interactions (e.g. DMs) with.EDIT: it is best to probably wait until the
e2e-protocol
branch is merged. See PR #1521.EDIT2: I think this PR would be best addressed by using reference counting (see #1249), but it can also be addressed by other means (see @Silver-IT's #1885)
The text was updated successfully, but these errors were encountered: