Note
(a common way of speech)A more formal version would be:
Ich dachte, daß wir Freunde sind.
or with the use of conjunctive:
Ich dachte, wir wären Freunde.
(implying that apparently that is not the case)
Elon.io is an online learning platform
We have an entire course teaching German grammar and vocabulary.