Add new agreed URLs to account data instead of overwriting
This changes terms account data storage to always add, rather than setting only the current set of displayed URLs. Fixes https://github.com/vector-im/riot-web/issues/10755
This commit is contained in:
parent
4575aaa9f6
commit
0929a9cc72
1 changed files with 2 additions and 1 deletions
|
@ -119,7 +119,8 @@ export async function startTermsFlow(
|
|||
if (unagreedPoliciesAndServicePairs.length > 0) {
|
||||
const newlyAgreedUrls = await interactionCallback(unagreedPoliciesAndServicePairs, [...agreedUrlSet]);
|
||||
console.log("User has agreed to URLs", newlyAgreedUrls);
|
||||
agreedUrlSet = new Set(newlyAgreedUrls);
|
||||
// Merge with previously agreed URLs
|
||||
newlyAgreedUrls.forEach(url => agreedUrlSet.add(url));
|
||||
} else {
|
||||
console.log("User has already agreed to all required policies");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue