(text: string)
| 496 | } |
| 497 | |
| 498 | dispatchTextMessageAction(text: string) { |
| 499 | this.props.inputState.setDraft(''); |
| 500 | |
| 501 | const localID = getNextLocalID(); |
| 502 | const creatorID = this.props.viewerID; |
| 503 | invariant(creatorID, 'should have viewer ID in order to send a message'); |
| 504 | |
| 505 | void this.props.inputState.sendTextMessage( |
| 506 | { |
| 507 | type: messageTypes.TEXT, |
| 508 | localID, |
| 509 | threadID: this.props.threadInfo.id, |
| 510 | text, |
| 511 | creatorID, |
| 512 | time: Date.now(), |
| 513 | }, |
| 514 | this.props.threadInfo, |
| 515 | this.props.parentThreadInfo, |
| 516 | ); |
| 517 | } |
| 518 | |
| 519 | multimediaInputRef = (multimediaInput: ?HTMLInputElement) => { |
| 520 | this.multimediaInput = multimediaInput; |
no test coverage detected