SideEffects / ChatView: Add an unread cache.

This is to prevent wrong values in the stream.
This commit is contained in:
lain 2020-06-05 12:01:33 +02:00
commit cc8a7dc205
5 changed files with 30 additions and 22 deletions

View file

@ -55,6 +55,8 @@ defmodule Pleroma.Web.StreamerView do
# Explicitly giving the cmr for the object here, so we don't accidentally
# send a later 'last_message' that was inserted between inserting this and
# streaming it out
#
# It also contains the chat with a cache of the correct unread count
Logger.debug("Trying to stream out #{inspect(cm_ref)}")
representation =