浏览代码

Credo fixes.

1570-levenshtein-distance-user-search
lain 4 年前
父节点
当前提交
f3ea6ee2c8
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. +2
    -1
      lib/pleroma/web/activity_pub/side_effects.ex
  2. +1
    -1
      lib/pleroma/web/views/streamer_view.ex

+ 2
- 1
lib/pleroma/web/activity_pub/side_effects.ex 查看文件

@@ -142,7 +142,8 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
{:ok, chat} = Chat.bump_or_create(user.id, other_user.ap_id)
{:ok, cm_ref} = ChatMessageReference.create(chat, object, user.ap_id != actor.ap_id)

# We add a cache of the unread value here so that it doesn't change when being streamed out
# We add a cache of the unread value here so that it
# doesn't change when being streamed out
chat =
chat
|> Map.put(:unread, ChatMessageReference.unread_count_for_chat(chat))


+ 1
- 1
lib/pleroma/web/views/streamer_view.ex 查看文件

@@ -55,7 +55,7 @@ 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)}")



正在加载...
取消
保存