Giter Site home page Giter Site logo

stream_chat's People

Contributors

sophiedebenedetto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

stream_chat's Issues

Missing `subquery()` call in `StreamChat.Chat.Message.Query.previous_n/3`

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 ๐Ÿ˜„

KeyError at GET /users/settings

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.