Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: api v3 support for typing endpoint [FS-1311] #14274

Merged
merged 2 commits into from
Dec 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions src/script/conversation/ConversationRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1717,27 +1717,11 @@ export class ConversationRepository {
}

public async sendTypingStart(conversationEntity: Conversation) {
/*
Currently typing endpoint is not implemented on backend for federated environments
@todo: remove this condition when backend is ready and api-client in packages is updated to support domain in typing endpoint
*/
const isFederated = this.core.backendFeatures?.isFederated;
if (isFederated) {
return;
}
this.core.service!.conversation.sendTypingStart(conversationEntity.id);
this.core.service!.conversation.sendTypingStart(conversationEntity.qualifiedId);
Copy link
Contributor Author

@PatrykBuniX PatrykBuniX Dec 8, 2022

Choose a reason for hiding this comment

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

conversationEntity.qualifiedId is a getter that returns {domain: conversationEntity.domain, id: conversationEntity.id};

api version and federation checks are included in api-client

}

public async sendTypingStop(conversationEntity: Conversation) {
/*
Currently typing endpoint is not implemented on backend for federated environments
@todo: remove this condition when backend is ready and api-client in packages is updated to support domain in typing endpoint
*/
const isFederated = this.core.backendFeatures?.isFederated;
if (isFederated) {
return;
}
this.core.service!.conversation.sendTypingStop(conversationEntity.id);
this.core.service!.conversation.sendTypingStop(conversationEntity.qualifiedId);
}

private async toggleArchiveConversation(
Expand Down