Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
219
Issues
219
List
Boards
Labels
Service Desk
Milestones
Merge Requests
37
Merge Requests
37
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
c6d2641f
Commit
c6d2641f
authored
29 minutes ago
by
Guy Thouret
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat) Ignore certain state changes when sending user notifications
parent
142841ae
feat/588-state-on-user
1 merge request
!285
Reward Factors for User Activity
Pipeline
#84116160
failed with stages
in 4 minutes and 39 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
UpdateUserState.php
Core/Analytics/Delegates/UpdateUserState.php
+7
-1
UpdateUserStateEstimate.php
Core/Analytics/Delegates/UpdateUserStateEstimate.php
+8
-1
No files found.
Core/Analytics/Delegates/UpdateUserState.php
View file @
c6d2641f
...
...
@@ -39,7 +39,13 @@ class UpdateUserState
private
function
sendStateChangeNotification
()
:
void
{
if
(
$this
->
userState
->
getStateChange
()
!==
0
)
{
$ignoreStates
=
[
UserState
::
STATE_UNKNOWN
,
UserState
::
STATE_NEW
];
if
(
$this
->
userState
->
getStateChange
()
!==
0
&&
!
in_array
(
$this
->
userState
->
getState
(),
$ignoreStates
,
false
))
{
$notificationView
=
(
$this
->
userState
->
getStateChange
()
>
0
)
?
'rewards_state_increase'
:
'rewards_state_decrease'
;
Dispatcher
::
trigger
(
'notification'
,
'reward'
,
[
...
...
This diff is collapsed.
Click to expand it.
Core/Analytics/Delegates/UpdateUserStateEstimate.php
View file @
c6d2641f
...
...
@@ -44,7 +44,14 @@ class UpdateUserStateEstimate
private
function
sendStateChangeNotification
()
:
void
{
if
(
$this
->
estimateStateChange
<
0
)
{
$ignoreStates
=
[
UserState
::
STATE_UNKNOWN
,
UserState
::
STATE_RESURRECTED
,
UserState
::
STATE_NEW
];
if
(
$this
->
estimateStateChange
<
0
&&
!
in_array
(
$this
->
userState
->
getState
(),
$ignoreStates
,
false
))
{
$notificationView
=
'rewards_state_decrease_today'
;
Dispatcher
::
trigger
(
'notification'
,
'reward'
,
[
'to'
=>
[
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment