diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java index 54d2d85a41..6170d2bc4f 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/ParamsProcessorUtil.java @@ -77,6 +77,7 @@ public class ParamsProcessorUtil { private Integer defaultHttpSessionTimeout = 14400; private Boolean useDefaultAvatar = false; private String defaultAvatarURL; + private String defaultBotAvatarURL; private Boolean useDefaultWebcamBackground = false; private String defaultWebcamBackgroundURL; private String defaultGuestPolicy; @@ -783,6 +784,7 @@ public class ParamsProcessorUtil { } String avatarURL = useDefaultAvatar ? defaultAvatarURL : ""; + String botAvatarURL = defaultBotAvatarURL; String webcamBackgroundURL = useDefaultWebcamBackground ? defaultWebcamBackgroundURL : ""; if(defaultAllowDuplicateExtUserid == false) { @@ -803,6 +805,7 @@ public class ParamsProcessorUtil { .withTelVoice(telVoice).withWebVoice(webVoice) .withDialNumber(dialNumber) .withDefaultAvatarURL(avatarURL) + .withDefaultBotAvatarURL(botAvatarURL) .withDefaultWebcamBackgroundURL(webcamBackgroundURL) .withAutoStartRecording(autoStartRec) .withAllowStartStopRecording(allowStartStoptRec) @@ -1393,6 +1396,10 @@ public class ParamsProcessorUtil { this.defaultAvatarURL = url; } + public void setDefaultBotAvatarURL(String url) { + this.defaultBotAvatarURL = url; + } + public void setUseDefaultWebcamBackground(Boolean value) { this.useDefaultWebcamBackground = value; } diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java index 04007338a7..9092238290 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/domain/Meeting.java @@ -77,6 +77,7 @@ public class Meeting { private Integer maxPinnedCameras = 0; private String dialNumber; private String defaultAvatarURL; + private String defaultBotAvatarURL; private String defaultWebcamBackgroundURL; private Map plugins; private ArrayList pluginsManifests; @@ -153,7 +154,8 @@ public class Meeting { logoutUrl = builder.logoutUrl; logoutTimer = builder.logoutTimer; defaultAvatarURL = builder.defaultAvatarURL; - defaultWebcamBackgroundURL = builder.defaultWebcamBackgroundURL; + defaultBotAvatarURL = builder.defaultBotAvatarURL; + defaultWebcamBackgroundURL = builder.defaultWebcamBackgroundURL; record = builder.record; autoStartRecording = builder.autoStartRecording; allowStartStopRecording = builder.allowStartStopRecording; @@ -479,6 +481,10 @@ public class Meeting { return defaultAvatarURL; } + public String getDefaultBotAvatarURL() { + return defaultBotAvatarURL; + } + public String getDefaultWebcamBackgroundURL() { return defaultWebcamBackgroundURL; } @@ -960,6 +966,7 @@ public class Meeting { private Map metadata; private String dialNumber; private String defaultAvatarURL; + private String defaultBotAvatarURL; private String defaultWebcamBackgroundURL; private long createdTime; private boolean isBreakout; @@ -1113,6 +1120,11 @@ public class Meeting { return this; } + public Builder withDefaultBotAvatarURL(String w) { + defaultBotAvatarURL = w; + return this; + } + public Builder withDefaultWebcamBackgroundURL(String w) { defaultWebcamBackgroundURL = w; return this; diff --git a/bigbluebutton-html5/public/resources/images/bot-avatar.png b/bigbluebutton-html5/public/resources/images/bot-avatar.png new file mode 100644 index 0000000000..29fafa8959 Binary files /dev/null and b/bigbluebutton-html5/public/resources/images/bot-avatar.png differ diff --git a/bigbluebutton-web/grails-app/conf/bigbluebutton.properties b/bigbluebutton-web/grails-app/conf/bigbluebutton.properties index 31cd6b1e77..5ed65764f9 100644 --- a/bigbluebutton-web/grails-app/conf/bigbluebutton.properties +++ b/bigbluebutton-web/grails-app/conf/bigbluebutton.properties @@ -332,6 +332,7 @@ defaultHttpSessionTimeout=14400 # The default avatar image to display. useDefaultAvatar=false defaultAvatarURL=${bigbluebutton.web.serverURL}/html5client/resources/images/avatar.png +defaultBotAvatarURL=${bigbluebutton.web.serverURL}/html5client/resources/images/bot-avatar.png # The default webcam background image to display. useDefaultWebcamBackground=false diff --git a/bigbluebutton-web/grails-app/conf/spring/resources.xml b/bigbluebutton-web/grails-app/conf/spring/resources.xml index 2f3b330463..7194602b0f 100755 --- a/bigbluebutton-web/grails-app/conf/spring/resources.xml +++ b/bigbluebutton-web/grails-app/conf/spring/resources.xml @@ -162,6 +162,7 @@ with BigBlueButton; if not, see . + diff --git a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy index 61467172cc..ddf26f5550 100755 --- a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy +++ b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy @@ -458,6 +458,8 @@ class ApiController { if (!StringUtils.isEmpty(params.avatarURL)) { us.avatarURL = params.avatarURL; + } else if (us.bot) { + us.avatarURL = meeting.defaultBotAvatarURL } else { us.avatarURL = meeting.defaultAvatarURL }