Browse Source

Don't return deleted files

Signed-off-by: Vitor Mattos <vitor@php.rio>
pull/7939/head
Vitor Mattos 3 years ago
parent
commit
f028161f4e
No known key found for this signature in database GPG Key ID: B7AB4B76A7CA7318
  1. 1
      lib/Chat/Parser/SystemMessage.php
  2. 14
      tests/integration/features/sharing/delete.feature

1
lib/Chat/Parser/SystemMessage.php

@ -417,6 +417,7 @@ class SystemMessage {
$chatMessage->setMessageType(ChatManager::VERB_MESSAGE);
}
} catch (\Exception $e) {
$chatMessage->setVisibility(false);
$parsedMessage = $this->l->t('{actor} shared a file which is no longer available');
if ($currentUserIsActor) {
$parsedMessage = $this->l->t('You shared a file which is no longer available');

14
tests/integration/features/sharing/delete.feature

@ -353,3 +353,17 @@ Feature: delete
| share_with | participant2 |
| share_with_displayname | participant2-displayname |
| share_type | 0 |
Scenario: Delete file in app Files and don't receive the deleted file when list the shared files with "file" format
Given user "participant1" creates room "public room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" shares "welcome.txt" with room "public room" with OCS 100
And user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public room | users | participant1 | participant1-displayname | {file} | "IGNORE" |
When user "participant1" deletes file "welcome.txt"
Then user "participant1" sees the following shared file in room "public room" with 200
And user "participant1" sees the following system messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | systemMessage |
| public room | users | participant1 | participant1-displayname | conversation_created |
Loading…
Cancel
Save