(e)
| 216 | |
| 217 | // Triggered when the send new message form is submitted. |
| 218 | function onMessageFormSubmit(e) { |
| 219 | e.preventDefault(); |
| 220 | // Check that the user entered a message and is signed in. |
| 221 | if (messageInputElement.value && checkSignedInWithMessage()) { |
| 222 | saveMessage(messageInputElement.value).then(function() { |
| 223 | // Clear message text field and re-enable the SEND button. |
| 224 | resetMaterialTextfield(messageInputElement); |
| 225 | toggleButton(); |
| 226 | }); |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | // Triggers when the auth state change for instance when the user signs-in or signs-out. |
| 231 | function authStateObserver(user) { |
nothing calls this directly
no test coverage detected