Skip to content

Commit

Permalink
feat(conversation): add federated typing indicator
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Larch <anna@nextcloud.com>
  • Loading branch information
miaulalala committed Feb 19, 2025
1 parent 1761979 commit edec72e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/RoomController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2547,7 +2547,7 @@ public function getCapabilities(): DataResponse {
$data['config']['chat']['read-privacy'] = Participant::PRIVACY_PRIVATE;
}
if (isset($data['config']['chat']['typing-privacy'])) {
$data['config']['chat']['typing-privacy'] = Participant::PRIVACY_PRIVATE;
$data['config']['chat']['typing-privacy'] = $this->talkConfig->getUserTypingPrivacy($this->userId);
}
if (isset($data['config']['call']['start-without-media'])) {
$data['config']['call']['start-without-media'] = $this->talkConfig->getCallsStartWithoutMedia($this->userId);
Expand Down
1 change: 0 additions & 1 deletion lib/Federation/Proxy/TalkV1/ProxyRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public function overwrittenRemoteTalkHash(string $hash): string {
'config' => [
'chat' => [
'read-privacy',
'typing-privacy',
],
'call' => [
'blur-virtual-background',
Expand Down
26 changes: 26 additions & 0 deletions tests/integration/features/federation/chat.feature
Original file line number Diff line number Diff line change
Expand Up @@ -501,3 +501,29 @@ Feature: federation/chat
| actorType | actorId | actorDisplayName | reaction |
| users | participant1 | participant1-displayname | 🚀 |
| federated_users | participant2@{$REMOTE_URL} | participant2-displayname | 🚀 |


Scenario: Typing indicator
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 2 |
# Join and leave to clear the invite notification
Given user "participant2" joins room "LOCAL::room" with 200 (v4)
Given user "participant2" leaves room "LOCAL::room" with 200 (v4)
And using server "LOCAL"
When user "participant1" sets setting "typing_privacy" to 1 with 200 (v1)
Then user "participant1" has capability "spreed=>config=>chat=>typing-privacy" set to 1
# Public
When user "participant1" sets setting "typing_privacy" to 0 with 200 (v1)
Then user "participant1" has capability "spreed=>config=>chat=>typing-privacy" set to 0

0 comments on commit edec72e

Please sign in to comment.