Why is a @reference not resolved when passed as argument to a function?

I have created a quote function.

#let quote(text, author) = {
  rect(
     inset: 0in,
     box(
        width: 100%,
        fill: silver,
        inset: 1em,
        [#text
        #align(right)[#sym.dash #author]
        ],   
      )
  )
}

It works as expect.

#quote("blablablabla", "John")

The problem is that if I try to add a reference in the author parameter (e.g: John@myReference). Then it just prints that “text” verbatim, without resolving the reference (I see - John@myReference as the author of the quote instead of John[1]. Is there a solution to this or my quote function is wrong?

I found the answer. I will leave it here in case it can help someone. The problem is that I was invoking the function with a string instead of a content.

#quote("blablablabla", [John@myRef])

works \0/ !

Still this is a bit tedious to have to call the function with content instead of a string.
why can I not convert the string author back into a content with [#author]? The following does not work.

#let quote(text, author) = {
  rect(
     inset: 0in,
     box(
        width: 100%,
        fill: silver,
        inset: 1em,
        [#text
        #align(right)[#sym.dash #author]
        ],   
      )
  )
}

Notice how I try to convert the string into a content with [#string] (to no avail).

The reference syntax is only available in markup mode. You shouldn’t use things like they are not supposed to be used, this gives no benefit whatsoever. You can use eval to evaluate stuff.

There is a built-in quote function:

#show quote.where(block: true): set pad(0pt)
#show quote.where(block: true): block.with(
  width: 100%,
  inset: 1em,
  stroke: 1pt,
  fill: silver,
)

#let attr = eval.with(mode: "markup")

#figure(supplement: "Mastodon")[] <myRef>

#quote("blablablabla", block: true, attribution: [John@myRef])

#quote("blablablabla", block: true, attribution: attr("John@myRef"))