Event Counters
This commit is contained in:
1 parent
5da911fe0f
commit
9a4aadc14d
2 files changed
+11
-9
No files matched your search
+7
-4
@@ -67,9 +67,9 @@ exports.newEvent = function newEvent() {
|
||||
|
||||
thisObject.emitterUserProfile = NT.memory.USER_PROFILES.get(event.emitterUserProfileId)
|
||||
if (thisObject.emitterUserProfile === undefined) {
|
||||
/* The message is ignored */
|
||||
return
|
||||
throw ('Emitter User Profile Not Found.')
|
||||
}
|
||||
thisObject.emitterUserProfile.emitterEventsCount++
|
||||
|
||||
thisObject.targetUserProfile = NT.memory.USER_PROFILES.get(event.targetUserProfileId)
|
||||
if (thisObject.targetUserProfile === undefined) {
|
||||
@@ -77,8 +77,11 @@ exports.newEvent = function newEvent() {
|
||||
if (
|
||||
event.eventType !== EVENT_TYPES.NEW_MULTI_MEDIA_POST &&
|
||||
event.eventType !== EVENT_TYPES.NEW_TRADE_POST
|
||||
)
|
||||
throw ('Target User Profile Not Found.')
|
||||
) {
|
||||
throw ('Target User Profile Not Found.')
|
||||
}
|
||||
} else {
|
||||
thisObject.targetUserProfile.targetEventsCount++
|
||||
}
|
||||
|
||||
thisObject.eventId = event.eventId
|
||||
|
||||
@@ -9,12 +9,12 @@ exports.newUserProfile = function newUserProfile() {
|
||||
tradePostsFollowing: undefined,
|
||||
tradePostsFollowers: undefined,
|
||||
ranking: undefined,
|
||||
events: undefined,
|
||||
multiMediaPostFollowingCount: undefined,
|
||||
multiMediaPostFollowersCount: undefined,
|
||||
tradePostsFollowingCount: undefined,
|
||||
tradePostsFollowersCount: undefined,
|
||||
eventsCount: undefined,
|
||||
emitterEventsCount: undefined,
|
||||
targetEventsCount: undefined,
|
||||
postsCount: undefined,
|
||||
addMultiMediaPostsFollowing: addMultiMediaPostsFollowing,
|
||||
removeMultiMediaPostsFollowing: removeMultiMediaPostsFollowing,
|
||||
@@ -42,13 +42,12 @@ exports.newUserProfile = function newUserProfile() {
|
||||
thisObject.tradePostsFollowing = new Map()
|
||||
thisObject.tradePostsFollowers = new Map()
|
||||
|
||||
thisObject.events = [] // Dont know what this is
|
||||
|
||||
thisObject.multiMediaPostFollowingCount = 0
|
||||
thisObject.multiMediaPostFollowersCount = 0
|
||||
thisObject.tradePostsFollowingCount = 0
|
||||
thisObject.tradePostsFollowersCount = 0
|
||||
thisObject.eventsCount = 0
|
||||
thisObject.emitterEventsCount = 0
|
||||
thisObject.targetEventsCount = 0
|
||||
thisObject.postsCount = 0
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user