MCPcopy Create free account
hub / github.com/CommE2E/comm / dispatchTextMessageAction

Method dispatchTextMessageAction

web/chat/chat-input-bar.react.js:498–517  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

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;

Callers 1

sendMethod · 0.95

Calls 3

getNextLocalIDFunction · 0.90
setDraftMethod · 0.80
sendTextMessageMethod · 0.80

Tested by

no test coverage detected