diff --git a/ts/components/session/LeftPaneContactSection.tsx b/ts/components/session/LeftPaneContactSection.tsx index ad84635b7..e78c14005 100644 --- a/ts/components/session/LeftPaneContactSection.tsx +++ b/ts/components/session/LeftPaneContactSection.tsx @@ -237,7 +237,7 @@ export class LeftPaneContactSection extends React.Component { } private handleOnAddContact() { - const sessionID = this.state.addContactRecipientID; + const sessionID = this.state.addContactRecipientID.trim(); const error = validateNumber(sessionID, window.i18n); if (error) { diff --git a/ts/components/session/LeftPaneMessageSection.tsx b/ts/components/session/LeftPaneMessageSection.tsx index 16bc9871c..0f7eba2ca 100644 --- a/ts/components/session/LeftPaneMessageSection.tsx +++ b/ts/components/session/LeftPaneMessageSection.tsx @@ -278,6 +278,7 @@ export class LeftPaneMessageSection extends React.Component { } let pubkey: string; pubkey = this.state.pubKeyPasted || this.props.searchTerm; + pubkey = pubkey.trim(); const error = validateNumber(pubkey); if (!error) {