Skip to content

Commit e76b412

Browse files
author
Parth Shah
committed
updating coderbot value and fixes system hardcoded values
1 parent b106e34 commit e76b412

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/config/constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ export const PROJECT_REF_CODE_MAX_LENGTH = 7
211211
export const PROJECT_FEED_TYPE_PRIMARY = 'PRIMARY'
212212
export const PROJECT_FEED_TYPE_MESSAGES = 'MESSAGES'
213213

214-
export const DISCOURSE_BOT_USERID = 'system'
215-
export const CODER_BOT_USERID = 'system'
214+
export const DISCOURSE_BOT_USERID = 'CoderBot'
215+
export const CODER_BOT_USERID = 'CoderBot'
216216
export const CODER_BOT_USER_FNAME = 'Coder'
217217
export const CODER_BOT_USER_LNAME = 'Bot'
218218

src/projects/actions/projectTopics.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {
77
CREATE_PROJECT_FEED,
88
LOAD_PROJECT_FEED_COMMENTS,
99
CREATE_PROJECT_FEED_COMMENT,
10-
LOAD_PROJECT_FEEDS_MEMBERS
10+
LOAD_PROJECT_FEEDS_MEMBERS,
11+
DISCOURSE_BOT_USERID,
12+
CODER_BOT_USERID
1113
} from '../../config/constants'
1214
import { loadMembers } from '../../actions/members'
1315
import { EventTypes } from 'redux-segment'
@@ -85,7 +87,7 @@ const getProjectTopicsWithMember = (dispatch, projectId, tag) => {
8587
userIds = _.union(userIds, _.map(topic.posts, 'userId'))
8688
})
8789
// this is to remove any nulls from the list (dev had some bad data)
88-
_.remove(userIds, i => !i || i === 'system')
90+
_.remove(userIds, i => !i || [DISCOURSE_BOT_USERID, CODER_BOT_USERID].indexOf(i) > -1)
8991
// return if there are no userIds to retrieve, empty result set
9092
if (!userIds.length)
9193
resolve(value)

0 commit comments

Comments
 (0)