Skip to content

Commit

Permalink
fix: apps typing indicator not working (#30360)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dnouv authored Oct 16, 2023
1 parent c38711b commit 809eb63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rich-dogs-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Fix typing indicator of Apps user
6 changes: 5 additions & 1 deletion apps/meteor/app/apps/server/bridges/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ export class AppMessageBridge extends MessageBridge {
protected async typing({ scope, id, username, isTyping }: ITypingDescriptor): Promise<void> {
switch (scope) {
case 'room':
notifications.notifyRoom(id, 'typing', username!, isTyping);
if (!username) {
throw new Error('Invalid username');
}

notifications.notifyRoom(id, 'user-activity', username, isTyping ? ['user-typing'] : []);
return;
default:
throw new Error('Unrecognized typing scope provided');
Expand Down

0 comments on commit 809eb63

Please sign in to comment.