+ try {
+ this.config = await this.getConfig();
+ } catch (error) {
+ this.offline = true;
+ }
+
+ // Look for a new message if an endpoint is provided.
+ if (this.config.message.url) {
+ this.getMessage(this.config.message.url).then(function(message){
+ // keep the original config value if no value is provided by the endpoint
+ for (const prop of ['title','style','content']) {
+ if (prop in message && message[prop] !== null) {
+ that.config.message[prop] = message[prop];
+ }
+ }
+ });
+ }