Resolve state when inserting create room event

Cleanup code
This commit is contained in:
Pim Kunis 2021-07-24 00:13:12 +02:00
parent 135df49d1b
commit b9156ed8b3
4 changed files with 83 additions and 242 deletions

View file

@ -1,4 +1,15 @@
alias MatrixServer.{Repo, Room, Event}
alias MatrixServer.{Repo, Room, Event, Account, Device}
Repo.insert!(%Account{
localpart: "chuck",
password_hash: Bcrypt.hash_pwd_salt("sneed")
})
Repo.insert(%Device{
device_id: "android",
display_name: "My Android",
localpart: "chuck"
})
# Auth difference example from here:
# https://matrix.org/docs/guides/implementing-stateres#auth-differences