display name of the user who ended the meeting
This commit is contained in:
parent
bca8b7baac
commit
c9ac737207
@ -2,6 +2,8 @@ import { Meteor } from 'meteor/meteor';
|
||||
import RedisPubSub from '/imports/startup/server/redis';
|
||||
import Logger from '/imports/startup/server/logger';
|
||||
import { extractCredentials } from '/imports/api/common/server/helpers';
|
||||
import Meetings from '/imports/api/meetings';
|
||||
import Users from '/imports/api/users';
|
||||
|
||||
export default function endMeeting() {
|
||||
const REDIS_CONFIG = Meteor.settings.private.redis;
|
||||
@ -9,6 +11,25 @@ export default function endMeeting() {
|
||||
const EVENT_NAME = 'LogoutAndEndMeetingCmdMsg';
|
||||
const { meetingId, requesterUserId } = extractCredentials(this.userId);
|
||||
|
||||
const endedBy = Users.findOne({
|
||||
meetingId,
|
||||
userId: requesterUserId,
|
||||
}, { fields: { name: 1 } });
|
||||
|
||||
if (endedBy) {
|
||||
const selector = {
|
||||
meetingId,
|
||||
};
|
||||
|
||||
const modifier = {
|
||||
$set: {
|
||||
meetingEndedBy: endedBy.name,
|
||||
},
|
||||
};
|
||||
|
||||
Meetings.update(selector, modifier);
|
||||
}
|
||||
|
||||
const payload = {
|
||||
userId: requesterUserId,
|
||||
};
|
||||
|
@ -11,6 +11,7 @@ import Rating from './rating/component';
|
||||
import { styles } from './styles';
|
||||
import logger from '/imports/startup/client/logger';
|
||||
import Users from '/imports/api/users';
|
||||
import Meetings from '/imports/api/meetings';
|
||||
import AudioManager from '/imports/ui/services/audio-manager';
|
||||
import { meetingIsBreakout } from '/imports/ui/components/app/service';
|
||||
|
||||
@ -35,6 +36,10 @@ const intlMessage = defineMessages({
|
||||
id: 'app.meeting.endedMessage',
|
||||
description: 'message saying to go back to home screen',
|
||||
},
|
||||
messageEndedByUser: {
|
||||
id: 'app.meeting.endedByUserMessage',
|
||||
description: 'message informing who ended the meeting',
|
||||
},
|
||||
buttonOkay: {
|
||||
id: 'app.meeting.endNotification.ok.label',
|
||||
description: 'label okay for button',
|
||||
@ -116,6 +121,11 @@ class MeetingEnded extends PureComponent {
|
||||
this.localUserRole = user.role;
|
||||
}
|
||||
|
||||
const meeting = Meetings.findOne({ id: user.meetingID });
|
||||
if (meeting) {
|
||||
this.meetingEndedBy = meeting.meetingEndedBy;
|
||||
}
|
||||
|
||||
this.setSelectedStar = this.setSelectedStar.bind(this);
|
||||
this.confirmRedirect = this.confirmRedirect.bind(this);
|
||||
this.sendFeedback = this.sendFeedback.bind(this);
|
||||
@ -209,6 +219,11 @@ class MeetingEnded extends PureComponent {
|
||||
</h1>
|
||||
{!allowRedirectToLogoutURL() ? null : (
|
||||
<div>
|
||||
{this.meetingEndedBy ? (
|
||||
<div className={styles.text}>
|
||||
{intl.formatMessage(intlMessage.messageEndedByUser, { 0: this.meetingEndedBy })}
|
||||
</div>
|
||||
) : null}
|
||||
<div className={styles.text}>
|
||||
{intl.formatMessage(intlMessage.messageEnded)}
|
||||
</div>
|
||||
|
@ -133,6 +133,7 @@
|
||||
"app.meeting.ended": "This session has ended",
|
||||
"app.meeting.meetingTimeRemaining": "Meeting time remaining: {0}",
|
||||
"app.meeting.meetingTimeHasEnded": "Time ended. Meeting will close soon",
|
||||
"app.meeting.endedByUserMessage": "The meeting was ended by {0}",
|
||||
"app.meeting.endedMessage": "You will be forwarded back to the home screen",
|
||||
"app.meeting.alertMeetingEndsUnderMinutesSingular": "Meeting is closing in one minute.",
|
||||
"app.meeting.alertMeetingEndsUnderMinutesPlural": "Meeting is closing in {0} minutes.",
|
||||
|
Loading…
Reference in New Issue
Block a user