- rename user leaving message

This commit is contained in:
Richard Alam 2015-05-20 14:11:11 -07:00
parent 734c5fa956
commit aa92b572b3
2 changed files with 6 additions and 6 deletions

View File

@ -4,14 +4,14 @@ import java.util.HashMap;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class UserLeftMessage implements IMessage {
public class UserLeavingMessage implements IMessage {
public static final String USER_LEFT = "user_leaving_request";
public final String VERSION = "0.0.1";
public final String meetingId;
public final String userId;
public UserLeftMessage(String meetingID, String internalUserId) {
public UserLeavingMessage(String meetingID, String internalUserId) {
this.meetingId = meetingID;
this.userId = internalUserId;
}
@ -25,7 +25,7 @@ public class UserLeftMessage implements IMessage {
return MessageBuilder.buildJson(header, payload);
}
public static UserLeftMessage fromJson(String message) {
public static UserLeavingMessage fromJson(String message) {
JsonParser parser = new JsonParser();
JsonObject obj = (JsonObject) parser.parse(message);
@ -40,7 +40,7 @@ public class UserLeftMessage implements IMessage {
&& payload.has(Constants.USER_ID)) {
String meetingID = payload.get(Constants.MEETING_ID).getAsString();
String userid = payload.get(Constants.USER_ID).getAsString();
return new UserLeftMessage(meetingID, userid);
return new UserLeavingMessage(meetingID, userid);
}
}
}

View File

@ -6,7 +6,7 @@ import org.bigbluebutton.conference.service.messaging.GetChatHistory;
import org.bigbluebutton.conference.service.messaging.MessagingConstants;
import org.bigbluebutton.conference.service.messaging.SendPublicChatMessage;
import org.bigbluebutton.conference.service.messaging.MessagingConstants;
import org.bigbluebutton.conference.service.messaging.UserLeftMessage;
import org.bigbluebutton.conference.service.messaging.UserLeavingMessage;
import org.bigbluebutton.conference.service.messaging.ValidateAuthTokenMessage;
import org.bigbluebutton.conference.service.messaging.redis.MessageSender;
@ -153,7 +153,7 @@ public class Red5BBBInGw implements IBigBlueButtonInGW {
@Override
public void userLeft(String meetingId, String userId, String sessionId) {
UserLeftMessage msg = new UserLeftMessage(meetingId, userId);
UserLeavingMessage msg = new UserLeavingMessage(meetingId, userId);
sender.send(MessagingConstants.TO_USERS_CHANNEL, msg.toJson());
}