Merge pull request #12256 from Tainan404/filter-bymeetingId
Add filter by meetingId in server queries
This commit is contained in:
commit
5e11fb314b
@ -1,6 +1,7 @@
|
||||
import RedisPubSub from '/imports/startup/server/redis';
|
||||
import Captions from '/imports/api/captions';
|
||||
import Logger from '/imports/startup/server/logger';
|
||||
import { extractCredentials } from '/imports/api/common/server/helpers';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { check } from 'meteor/check';
|
||||
|
||||
@ -14,7 +15,8 @@ export default function editCaptions(padId, data) {
|
||||
check(padId, String);
|
||||
check(data, String);
|
||||
|
||||
const pad = Captions.findOne({ padId });
|
||||
const { meetingId: creadentialMeetingId } = extractCredentials(this.userId);
|
||||
const pad = Captions.findOne({ padId, meetingId: creadentialMeetingId });
|
||||
|
||||
if (!pad) {
|
||||
Logger.error(`Editing captions history: ${padId}`);
|
||||
|
@ -20,7 +20,7 @@ function groupChatMsg(chatsIds) {
|
||||
|
||||
Logger.debug('Publishing group-chat-msg', { meetingId, userId });
|
||||
|
||||
const User = Users.findOne({ userId });
|
||||
const User = Users.findOne({ userId, meetingId });
|
||||
const selector = {
|
||||
timestamp: { $gte: User.authTokenValidatedTime },
|
||||
$or: [
|
||||
|
@ -15,7 +15,11 @@ export default function publishVote(pollId, pollAnswerId) {
|
||||
check(pollAnswerId, Number);
|
||||
check(pollId, String);
|
||||
|
||||
const allowedToVote = Polls.findOne({ id: pollId, users: { $in: [requesterUserId] } }, {
|
||||
const allowedToVote = Polls.findOne({
|
||||
id: pollId,
|
||||
users: { $in: [requesterUserId] },
|
||||
meetingId,
|
||||
}, {
|
||||
fields: {
|
||||
users: 1,
|
||||
},
|
||||
|
@ -14,7 +14,7 @@ function userSettings() {
|
||||
|
||||
const { meetingId, userId } = tokenValidation;
|
||||
|
||||
const currentUser = User.findOne({ userId });
|
||||
const currentUser = User.findOne({ userId, meetingId });
|
||||
|
||||
if (currentUser && currentUser.breakoutProps.isBreakoutUser) {
|
||||
const { parentId } = currentUser.breakoutProps;
|
||||
|
@ -12,9 +12,9 @@ const getDeviceId = (stream) => {
|
||||
return stream;
|
||||
};
|
||||
|
||||
const getUserName = (userId) => {
|
||||
const getUserName = (userId, meetingId) => {
|
||||
const user = Users.findOne(
|
||||
{ userId },
|
||||
{ userId, meetingId },
|
||||
{ fields: { name: 1 } },
|
||||
);
|
||||
if (user) return user.name;
|
||||
|
@ -15,7 +15,7 @@ export default function sharedWebcam(meetingId, userId, stream) {
|
||||
check(stream, String);
|
||||
|
||||
const deviceId = getDeviceId(stream);
|
||||
const name = getUserName(userId);
|
||||
const name = getUserName(userId, meetingId);
|
||||
const vu = VoiceUsers.findOne(
|
||||
{ meetingId, intId: userId },
|
||||
{ fields: { floor: 1, lastFloorTime: 1 }}
|
||||
|
Loading…
Reference in New Issue
Block a user