fix: separate Reddit and Matrix runtime identities
This commit is contained in:
1 parent
5623100e93
commit
a44768c089
2 files changed
+32
-7
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
RedditAccountRuntimeManager,
|
||||
type RedditAccountRuntimeResources,
|
||||
} from '../src/services/reddit-account-runtime.js';
|
||||
import { runtimeAuthenticatedAccount } from '../src/services/reddit-account-runtime-builder.js';
|
||||
|
||||
function account(
|
||||
key: string,
|
||||
@@ -219,6 +220,17 @@ describe('RedditAccountRuntimeManager', () => {
|
||||
});
|
||||
|
||||
describe('account runtime isolation', () => {
|
||||
it('uses the Reddit fullname for auth while retaining the Matrix runtime owner', () => {
|
||||
expect(runtimeAuthenticatedAccount(
|
||||
{ matrixUserId: '@t2_1u57iqxxbv:reddit.com' },
|
||||
{ username: 'Upset_Marsupial1006', accountId: 't2_1u57iqxxbv' },
|
||||
)).toEqual({
|
||||
accountId: 't2_1u57iqxxbv',
|
||||
redditUsername: 'Upset_Marsupial1006',
|
||||
matrixUserId: '@t2_1u57iqxxbv:reddit.com',
|
||||
});
|
||||
});
|
||||
|
||||
it('derives distinct deterministic browser profiles from account IDs', () => {
|
||||
const first = accountBrowserProfileDir('./data/browser', '@t2_first:reddit.com');
|
||||
const second = accountBrowserProfileDir('./data/browser', '@t2_second:reddit.com');
|
||||
|
||||
Reference in new issue
Block a user