Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fairblue
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hosting
chat
fairblue
Commits
a2785946
Commit
a2785946
authored
5 years ago
by
Anton Georgiev
Committed by
KDSBrowne
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
do not publish undefined poll
parent
035510ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bigbluebutton-html5/imports/api/polls/server/methods/publishPoll.js
+6
-2
6 additions, 2 deletions
...ton-html5/imports/api/polls/server/methods/publishPoll.js
with
6 additions
and
2 deletions
bigbluebutton-html5/imports/api/polls/server/methods/publishPoll.js
+
6
−
2
View file @
a2785946
import
RedisPubSub
from
'
/imports/startup/server/redis
'
;
import
{
check
}
from
'
meteor/check
'
;
import
Polls
from
'
/imports/api/polls
'
;
import
Logger
from
'
/imports/startup/server/logger
'
;
export
default
function
publishPoll
(
credentials
)
{
const
{
meetingId
,
requesterUserId
}
=
credentials
;
...
...
@@ -12,13 +13,16 @@ export default function publishPoll(credentials) {
check
(
requesterUserId
,
String
);
const
poll
=
Polls
.
findOne
({
meetingId
});
const
requester
=
requesterUserId
;
if
(
!
poll
)
{
Logger
.
error
(
`Attempted to publish inexisting poll for meetingId:
${
meetingId
}
`
);
return
false
;
}
return
RedisPubSub
.
publishUserMessage
(
CHANNEL
,
EVENT_NAME
,
meetingId
,
requester
,
requester
UserId
,
({
requesterId
:
requesterUserId
,
pollId
:
poll
.
id
}),
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment