membershipId method

String membershipId(
  1. String groupId,
  2. String userId
)

The ID of the membership of userId in groupId (group_memberships.id, 03), which "Expiring soon" names but the API GroupMember does not carry, so groupMembers stays as the group handlers return it.

Assigned with nextId on the first call and kept for the life of the world; unlike the server's new row, a member removed and added again keeps the ID (a simplification).

Implementation

String membershipId(String groupId, String userId) =>
    _membershipIds.putIfAbsent('$groupId|$userId', nextId);