Skip to content

Conversation

@seefeldb
Copy link
Contributor

Now that cell links have spaces, let's simplify the interface for getCellFromLink

@anotherjesse please double check the auth code, specifically that .space should be there because it's generated by Cell.getAsCellLink(). i'm not 100% that's for sure the case (vs hand creating it as { cell: ..., path: ... }).

@anotherjesse
Copy link
Contributor

this is good - cleaning this up would make it better:

    let authCellId = JSON.parse(JSON.stringify(this.auth, null, 2));
    authCellId.space = this.auth?.getAsCellLink().cell.space;
    authCellId = JSON.stringify(authCellId);

@anotherjesse
Copy link
Contributor

also why do we have 3 ways to do this:

a.getAsCellLink()
{space: 'did:key:z6MkvnH7NjbUnNrhKPwrNe2fzZJDsATcduWhwaGZG8WsocXX', cell: {…}, path: Array(2)}
a.toJSON()
{cell: {…}, path: Array(2)}
a.cellLink
{space: 'did:key:z6MkvnH7NjbUnNrhKPwrNe2fzZJDsATcduWhwaGZG8WsocXX', cell: {…}, path: Array(2)}

@anotherjesse
Copy link
Contributor

if you do:

- advanced - gmail import

then click "authenticate" - you can breakpoint here and see we don't get the space in the cell link

Screenshot 2025-03-13 at 6 32 25 AM

@anotherjesse
Copy link
Contributor

@seefeldb I'm going to merge this for now - as it does work and cleans up half of the code

@anotherjesse anotherjesse merged commit a59e891 into main Mar 13, 2025
5 checks passed
@anotherjesse anotherjesse deleted the assume-space-in-cell-link branch March 13, 2025 13:34
seefeldb added a commit that referenced this pull request Mar 13, 2025
seefeldb added a commit that referenced this pull request Mar 13, 2025
anotherjesse pushed a commit that referenced this pull request Mar 14, 2025
… to 634) (#636)

* add comments answering question from #634
* simplifying code, as suggested in #634
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants