sophiedebenedetto / stream_chat Goto Github PK
View Code? Open in Web Editor NEWLiveView app to demonstrating streams
LiveView app to demonstrating streams
While reading the article I noticed that something is off with previous_n
, because it's supposed to return the messages ordered ascending by inserted_at
, yet in the live view oldest_message_id
was being assigned to the last element of the result, not the first one (as it would logically make sense).
I narrowed down the problem to a missing subquery()
call (though properly used in for_room/2
) that influenced these misconceptions down the road.
It's worth noting that stream_batch_insert
will behave incorrectly once previous_n
is fixed because it will insert these previous messages to the beginning of the stream in reversed order. Hence, if it receives at: 0
in opts
, we should reverse the items
before using Enum.reduce
over it.
I believe it's important to raise that issue since the main purpose of this blog post is to showcase the stream feature yet an inconvenient bug crept into the code ๐
I get this error whenever i try to access the settings page, this is the whole error
key :name not found in: %{__changed__: nil, __given__: %{__changed__: nil, field: %Phoenix.HTML.FormField{id: "user_email", name: "user[email]", errors: [], field: :email, form: %Phoenix.HTML.Form{source: #Ecto.Changeset<action: nil, changes: %{}, errors: [email: {"did not change", []}], data: #StreamChat.Accounts.User<>, valid?: false>, impl: Phoenix.HTML.FormData.Ecto.Changeset, id: "user", name: "user", data: #StreamChat.Accounts.User<__meta__: #Ecto.Schema.Metadata<:loaded, "users">, id: 2, email: "[email protected]", confirmed_at: nil, profile_pic: nil, inserted_at: ~N[2023-05-09 20:34:42], updated_at: ~N[2023-05-09 20:34:42], ...>, hidden: [id: 2], params: %{}, errors: [], options: [method: "put"], index: nil, action: nil}, value: "[email protected]"}, label: "Email", type: "email"}, field: %Phoenix.HTML.FormField{id: "user_email", name: "user[email]", errors: [], field: :email, form: %Phoenix.HTML.Form{source: #Ecto.Changeset<action: nil, changes: %{}, errors: [email: {"did not change", []}], data: #StreamChat.Accounts.User<>, valid?: false>, impl: Phoenix.HTML.FormData.Ecto.Changeset, id: "user", name: "user", data: #StreamChat.Accounts.User<__meta__: #Ecto.Schema.Metadata<:loaded, "users">, id: 2, email: "[email protected]", confirmed_at: nil, profile_pic: nil, inserted_at: ~N[2023-05-09 20:34:42], updated_at: ~N[2023-05-09 20:34:42], ...>, hidden: [id: 2], params: %{}, errors: [], options: [method: "put"], index: nil, action: nil}, value: "[email protected]"}, inner_block: [], label: "Email", multiple: false, prompt: nil, rest: %{required: true}, type: "email"}
i also get it when i try to access /users/reset_password KeyError at GET /users/reset_password
can you please help me with those?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.