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

fix(reactions): Don't break mobile clients when the reactions list is… #10832

Merged
merged 1 commit into from Nov 3, 2023

Conversation

nickvergessen
Copy link
Member

… empty

☑️ Resolves

🛠️ API Checklist

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@nickvergessen nickvergessen added 3. to review bug feature: api 🛠️ OCS API for conversations, chats and participants feature: reactions 👍 labels Nov 3, 2023
@nickvergessen nickvergessen added this to the 💙 Next Beta (28) milestone Nov 3, 2023
@nickvergessen nickvergessen self-assigned this Nov 3, 2023
@nickvergessen nickvergessen force-pushed the bugfix/noid/empty-reactions-list branch from e69674d to 441087a Compare November 3, 2023 11:34
protected function assertEmptyArrayIsNotAListButADictionary(?TableNode $formData, string $content) {
if (!$formData instanceof TableNode || empty($formData->getHash())) {
$data = json_decode($content);
Assert::assertIsNotArray($data->ocs->data, 'Response ocs.data should be an "object" to represent a JSON dictionary, not a list-array');
Copy link
Member Author

Choose a reason for hiding this comment

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

Before the patch in lib this throws:

    Then user "participant1" retrieve reactions "👍" of message "Message 1" in room "room" with 200  # FeatureContext::userRetrieveReactionsOfMessageInRoomWith()
      | actorType | actorId | actorDisplayName | reaction |
      Data should be an "object" to represent a JSON dictionary, not a list
      Failed asserting that Array &0 () is not of type "array".

… empty

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen force-pushed the bugfix/noid/empty-reactions-list branch from 441087a to 96cf85e Compare November 3, 2023 12:10
Copy link
Contributor

@SystemKeeper SystemKeeper left a comment

Choose a reason for hiding this comment

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

Tested and works:
image

@nickvergessen nickvergessen merged commit 306b13f into main Nov 3, 2023
47 checks passed
@nickvergessen nickvergessen deleted the bugfix/noid/empty-reactions-list branch November 3, 2023 12:46
@nickvergessen
Copy link
Member Author

/backport to stable27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug feature: api 🛠️ OCS API for conversations, chats and participants feature: reactions 👍
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants