Use get_cached just in case
This commit is contained in:
@@ -95,7 +95,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.HighRollerPolicy do
|
||||
if (systime > actiontime && globalcount < Config.get([:mrf_high_roller, :global_threshold])) do
|
||||
Cachex.incr(:highroller, "global:"<>actor.nickname, globalcount+1)
|
||||
Cachex.put(:highroller, actor.nickname<>","<>recipient.nickname<>","<>action, systime+Config.get([:mrf_high_roller, :timeout]))
|
||||
CommonAPI.post(User.get_by_nickname(Config.get([:mrf_high_roller, :user])), %{
|
||||
CommonAPI.post(User.get_cached_by_nickname(Config.get([:mrf_high_roller, :user])), %{
|
||||
status: msg,
|
||||
visibility: Config.get([:mrf_high_roller, :block_visibility])
|
||||
})
|
||||
@@ -159,7 +159,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.HighRollerPolicy do
|
||||
if (systime > actiontime && globalcount < Config.get([:mrf_high_roller, :global_threshold])) do
|
||||
Cachex.incr(:highroller, "global:"<>actor.nickname, globalcount+1)
|
||||
Cachex.put(:highroller, actor.nickname<>","<>recipient.nickname<>",report", systime+Config.get([:mrf_high_roller, :timeout]))
|
||||
CommonAPI.post(User.get_by_nickname(Config.get([:mrf_high_roller, :user])), %{
|
||||
CommonAPI.post(User.get_cached_by_nickname(Config.get([:mrf_high_roller, :user])), %{
|
||||
status: msg <> comment <> posts,
|
||||
visibility: Config.get([:mrf_high_roller, :report_visibility])
|
||||
})
|
||||
@@ -203,7 +203,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.HighRollerPolicy do
|
||||
if (systime > actiontime && globalcount < Config.get([:mrf_high_roller, :global_threshold])) do
|
||||
Cachex.incr(:highroller, "global:"<>actor.nickname, globalcount+1)
|
||||
Cachex.put(:highroller, actor.nickname<>","<>recipient.nickname<>",unfollow", systime+Config.get([:mrf_high_roller, :timeout]))
|
||||
CommonAPI.post(User.get_by_nickname(Config.get([:mrf_high_roller, :user])), %{
|
||||
CommonAPI.post(User.get_cached_by_nickname(Config.get([:mrf_high_roller, :user])), %{
|
||||
status: msg,
|
||||
visibility: Config.get([:mrf_high_roller, :unfollow_visibility])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user