(e)
| 233 | |
| 234 | // Triggered when the send new message form is submitted. |
| 235 | function onMessageFormSubmit(e) { |
| 236 | e.preventDefault(); |
| 237 | // Check that the user entered a message and is signed in. |
| 238 | if (messageInputElement.value && checkSignedInWithMessage()) { |
| 239 | saveMessage(messageInputElement.value).then(function() { |
| 240 | // Clear message text field and re-enable the SEND button. |
| 241 | resetMaterialTextfield(messageInputElement); |
| 242 | toggleButton(); |
| 243 | }); |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | // Triggers when the auth state change for instance when the user signs-in or signs-out. |
| 248 | function authStateObserver(user) { |
nothing calls this directly
no test coverage detected