Skip to content

Conversation

@ketteiteki
Copy link
Contributor

@ketteiteki ketteiteki commented Jun 26, 2023

Implements #491

Copy link
Member

@kolosovpetro kolosovpetro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, few minor comments and suggestions

Copy link
Member

@kolosovpetro kolosovpetro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider creating separate real time group for every chat, this group is responsible for "is typing ..." notification.

}
}

onTypingHandler(event: KeyboardEvent) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const userData = this._tokensService.getTokens();
if (!userData) return;

if (event.key.match(/^[a-zA-Zа-яА-ЯёЁ0-9+\-[\]{}(),./'"]$/) || event.key === 'Backspace') {
Copy link
Member

@kolosovpetro kolosovpetro Jun 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this if (event.key.match(/^[a-zA-Zа-яА-ЯёЁ0-9+\-[\]{}(),./'"]$/) || event.key === 'Backspace') is redundant if we handle text input value changed event


onTypingHandler(event: KeyboardEvent) {
const userData = this._tokensService.getTokens();
if (!userData) return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please throw some exception here so we know that tokens are null or empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants