@@ -129,18 +129,18 @@ class WebhookBridge {
129129 LogService . info ( "WebhookBridge" , "Updating appearance of bridge bot" ) ;
130130
131131 const desiredDisplayName = this . _config . webhookBot . appearance . displayName || "Webhook Bridge" ;
132- const desiredAvatarUrl = this . _config . webhookBot . appearance . avatarUrl || "http://i.imgur.com/IDOBtEJ.png" ; // webhook icon
132+ const desiredAvatarUrl = this . _config . webhookBot . appearance . avatar_url || "http://i.imgur.com/IDOBtEJ.png" ; // webhook icon
133133
134134 const botIntent = this . getBotIntent ( ) ;
135135
136136 WebhookStore . getAccountData ( 'bridge' ) . then ( botProfile => {
137- let avatarUrl = botProfile . avatarUrl ;
138- if ( ! avatarUrl || avatarUrl !== desiredAvatarUrl ) {
137+ let avatar_url = botProfile . avatar_url ;
138+ if ( ! avatar_url || avatar_url !== desiredAvatarUrl ) {
139139 util . uploadContentFromUrl ( this . _bridge , desiredAvatarUrl , botIntent ) . then ( mxcUrl => {
140140 LogService . verbose ( "WebhookBridge" , "Avatar MXC URL = " + mxcUrl ) ;
141141 LogService . info ( "WebhookBridge" , "Updating avatar for bridge bot" ) ;
142142 botIntent . setAvatarUrl ( mxcUrl ) ;
143- botProfile . avatarUrl = desiredAvatarUrl ;
143+ botProfile . avatar_url = desiredAvatarUrl ;
144144 WebhookStore . setAccountData ( 'bridge' , botProfile ) ;
145145 } ) ;
146146 }
@@ -162,8 +162,8 @@ class WebhookBridge {
162162 return WebhookStore . getAccountData ( intent . getClient ( ) . credentials . userId ) . then ( botProfile => {
163163 const promises = [ ] ;
164164
165- let avatarUrl = botProfile . avatarUrl ;
166- if ( ( ! avatarUrl || avatarUrl !== desiredAvatarUrl ) && desiredAvatarUrl ) {
165+ let avatar_url = botProfile . avatar_url ;
166+ if ( ( ! avatar_url || avatar_url !== desiredAvatarUrl ) && desiredAvatarUrl ) {
167167 let uploadPromise = Promise . resolve ( desiredAvatarUrl ) ;
168168 if ( ! desiredAvatarUrl . startsWith ( "mxc://" ) )
169169 uploadPromise = util . uploadContentFromUrl ( this . _bridge , desiredAvatarUrl , this . getBotIntent ( ) ) ;
@@ -172,7 +172,7 @@ class WebhookBridge {
172172 LogService . verbose ( "WebhookBridge" , "Avatar MXC URL = " + mxcUrl ) ;
173173 LogService . info ( "WebhookBridge" , "Updating avatar for " + intent . getClient ( ) . credentials . userId ) ;
174174 return intent . setAvatarUrl ( mxcUrl ) . then ( ( ) => {
175- botProfile . avatarUrl = desiredAvatarUrl ;
175+ botProfile . avatar_url = desiredAvatarUrl ;
176176 WebhookStore . setAccountData ( intent . getClient ( ) . credentials . userId , botProfile ) ;
177177 } ) ;
178178 } ) ) ;
0 commit comments