- Jan 02, 2025
-
-
Hugo Costa authored
Co-authored-by:
Tasso <tasso.evangelista@rocket.chat>
-
- Dec 26, 2024
-
-
Tasso Evangelista authored
-
- Nov 14, 2024
-
-
Guilherme Gazzo authored
-
- Nov 04, 2024
-
-
Tasso Evangelista authored
Co-authored-by:
Guilherme Gazzo <guilhermegazzo@gmail.com>
-
- Oct 24, 2024
-
-
Douglas Fabris authored
Co-authored-by:
Tasso <tasso.evangelista@rocket.chat>
-
Tasso Evangelista authored
-
- Oct 17, 2024
-
-
Ricardo Garim authored
-
Tasso Evangelista authored
-
- Oct 08, 2024
-
-
Tasso Evangelista authored
-
Tasso Evangelista authored
-
- Sep 13, 2024
-
-
Tasso Evangelista authored
-
- Aug 06, 2024
-
-
Douglas Fabris authored
-
- Feb 08, 2024
-
-
Tiago Evangelista Pinto authored
Co-authored-by:
Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
-
- Dec 06, 2023
-
-
Douglas Fabris authored
-
- Dec 05, 2023
-
-
Douglas Fabris authored
Co-authored-by:
Guilherme Gazzo <guilhermegazzo@gmail.com>
-
- Aug 23, 2023
-
-
Júlia Jaeger Foresti authored
-
- Aug 07, 2023
-
-
Guilherme Gazzo authored
Co-authored-by:
dougfabris <devfabris@gmail.com>
-
- Jul 19, 2023
-
-
Tasso Evangelista authored
-
- Jul 05, 2023
-
-
Tasso Evangelista authored
-
- Jun 24, 2023
-
-
Douglas Fabris authored
-
- Jun 12, 2023
-
-
Douglas Fabris authored
-
- Mar 29, 2023
-
-
Tasso Evangelista authored
-
- Mar 23, 2023
-
-
Rodrigo Nascimento authored
-
- Jan 27, 2023
-
-
Douglas Fabris authored
-
- Jan 09, 2023
-
-
Diego Sampaio authored
Co-authored-by:
Tasso Evangelista <tasso.evangelista@rocket.chat>
-
- Dec 22, 2022
-
-
Lucas Andrade authored
Co-authored-by:
Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
-
- Dec 06, 2022
-
-
Tasso Evangelista authored
Co-authored-by:
Guilherme Gazzo <guilhermegazzo@gmail.com>
-
- Nov 03, 2022
-
-
Júlia Jaeger Foresti authored
-
- Nov 02, 2022
-
-
Júlia Jaeger Foresti authored
-
- Jun 22, 2022
-
-
Júlia Jaeger Foresti authored
<!-- This is a pull request template, you do not need to uncomment or remove the comments, they won't show up in the PR text. --> <!-- Your Pull Request name should start with one of the following tags [NEW] For new features [IMPROVE] For an improvement (performance or little improvements) in existing features [FIX] For bug fixes that affect the end-user [BREAK] For pull requests including breaking changes Chore: For small tasks Doc: For documentation --> <!-- Checklist!!! If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code. - I have read the Contributing Guide - https://github.com/RocketChat/Rocket.Chat/blob/develop/.github/CONTRIBUTING.md#contributing-to-rocketchat doc - I have signed the CLA - https://cla-assistant.io/RocketChat/Rocket.Chat - Lint and unit tests pass locally with my changes - I have added tests that prove my fix is effective or that my feature works (if applicable) - I have added necessary documentation (if applicable) - Any dependent changes have been merged and published in downstream modules --> ## Proposed changes (including videos or screenshots) <!-- CHANGELOG --> <!-- Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue below. This description will appear in the release notes if we accept the contribution. --> <!-- END CHANGELOG --> ## Issue(s) <!-- Link the issues being closed by or related to this PR. For example, you can use #594 if this PR closes issue number 594 --> ## Steps to test or reproduce <!-- Mention how you would reproduce the bug if not mentioned on the issue page already. Also mention which screens are going to have the changes if applicable --> ## Further comments <!-- If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... --> Co-authored-by:
Guilherme Gazzo <5263975+ggazzo@users.noreply.github.com>
-
- Jun 13, 2022
-
-
Ben Wiederhake authored
## Proposed changes (including videos or screenshots) - In the web-client, sorting the channel directory by "Last Message" raises the error "Invalid sort parameter provided". I don't think a screenshot is necessary, but if you'd like one anyway, here it is:  ## Issue(s) Closes #25695 ## Steps to test or reproduce - Open the web client, i.e. navigate your browser to `https://rocketchat.$DOMAIN/home` - Click the "Directory" button in the top left, (or just navigate directly to `https://rocketchat.$DOMAIN/directory/channels`) - In the table header, click on "Last message" once - In the table header, click on "Last message" again Expected behavior: Clicking "Last message" turns on and then toggles sorting by the date of the last message, either first ascending and then descending, or the other way around. Actual behavior: The first click sorts the messages in ascending order (good!), the second click shows a red warning box "FIXME", the table content disappears, and is replaced by throbbing grey placeholders. ### "Good" request (ascending order): `https://rocketchat.domain.org/api/v1/directory?query=%7B%22type%22%3A%22channels%22%2C%22text%22%3A%22%22%2C%22workspace%22%3A%22local%22%7D&sort=%7B%22lastMessage%22%3A1%7D&count=25` More easily readable GET parameters: ``` query | {"type":"channels","text":"","workspace":"local"} sort | {"lastMessage":1} count | 25 ``` Response: ``` {"result":[{"_id":"AAAAAAAAAAAAAAAAA","name":"foobar","fname":"foobar","t":"c","usersCount":10,"ts":"2019-01-01T00:00:00.000Z","default":false,"lastMessage":{"_id":"AAAAAAAAAAAAAAAAA","rid":"AAAAAAAAAAAAAAAAA","msg":"Hello, World!","ts":"2019-01-01T00:00:00.000Z","u":{"_id":"AAAAAAAAAAAAAAAAA","username":"normaluser","name":"normaluser"},"unread":true,"_updatedAt":"2019-01-01T00:00:00.000Z","urls":[],"mentions":[],"channels":[]},"description":"Obviously, this JSON response is heavily censored."}],"count":25,"offset":0,"total":52,"success":true} ``` (Obviously, this JSON response is heavily censored, but you get the gist: It was successful.) ### "Bad" request (descending order): `https://rocketchat.domain.org/api/v1/directory?query=%7B%22type%22%3A%22channels%22%2C%22text%22%3A%22%22%2C%22workspace%22%3A%22local%22%7D&sort=%7B%22lastMessage%22%3A0%7D&count=25` More easily readable GET parameters: ``` query | {"type":"channels","text":"","workspace":"local"} sort | {"lastMessage":0} count | 25 ``` Response: ``` {"success":false,"error":"Invalid sort parameter provided: \"{\"lastMessage\":0}\" [error-invalid-sort]","errorType":"error-invalid-sort","details":{"helperMethod":"parseJsonQuery"}} ``` ## Further comments Version on the server where I noticed this: `https://rocketchat.$DOMAIN/api/info` returns `{"version":"4.8","success":true}`. According to the "Releases" page, this version appeared 5 days ago, so I believe this is up to date. ### The journey to here For some reason, the descending order uses the wrong magic number "0", and the server can't interpret that. However, this *used* to work, so I'm not very sure about this. The error message appears in the source code of the entire organization exactly once: https://github.com/RocketChat/Rocket.Chat/blob/31ae30f30ad71d9e5a1b0cad494b3471a7dd8807/apps/meteor/app/api/server/helpers/parseJsonQuery.ts#L42 So I'll guess that this is the line of code that generated this particular message. A few lines above we see that the server only knows 1 and -1 as magic numbers for the sorting: https://github.com/RocketChat/Rocket.Chat/blob/31ae30f30ad71d9e5a1b0cad494b3471a7dd8807/apps/meteor/app/api/server/helpers/parseJsonQuery.ts#L35 This matches the observed bug: The browser sends 1 (which works) and 0 (which doesn't work). Generally, it seems that the web client actually uses the strings "asc" and "desc" internally, which are hard to mix up. So I assume that it's the conversion of that is broken somehow. Exactly this seems to be the case here: https://github.com/RocketChat/Rocket.Chat/blob/31ae30f30ad71d9e5a1b0cad494b3471a7dd8807/apps/meteor/client/views/directory/hooks.js#L11 The code around it produces exactly the kind of query seen in the network log, and can also produce the buggy parameter `sort: 0`. This either fixes bug #25695, or a different bug of the same kind. I am not sure how to add tests for this, can someone do this for me or show me where to start? I'm actually just an end-user and "accidentally" found the fix for the bug while writing the bug report ^^' EDIT: Rebased for convenience, and to re-check CI.
-
- Jun 08, 2022
-
-
Guilherme Gazzo authored
<!-- This is a pull request template, you do not need to uncomment or remove the comments, they won't show up in the PR text. --> <!-- Your Pull Request name should start with one of the following tags [NEW] For new features [IMPROVE] For an improvement (performance or little improvements) in existing features [FIX] For bug fixes that affect the end-user [BREAK] For pull requests including breaking changes Chore: For small tasks Doc: For documentation --> <!-- Checklist!!! If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code. - I have read the Contributing Guide - https://github.com/RocketChat/Rocket.Chat/blob/develop/.github/CONTRIBUTING.md#contributing-to-rocketchat doc - I have signed the CLA - https://cla-assistant.io/RocketChat/Rocket.Chat - Lint and unit tests pass locally with my changes - I have added tests that prove my fix is effective or that my feature works (if applicable) - I have added necessary documentation (if applicable) - Any dependent changes have been merged and published in downstream modules --> ## Proposed changes (including videos or screenshots) <!-- CHANGELOG --> <!-- Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue below. This description will appear in the release notes if we accept the contribution. --> <!-- END CHANGELOG --> ## Issue(s) <!-- Link the issues being closed by or related to this PR. For example, you can use #594 if this PR closes issue number 594 --> ## Steps to test or reproduce <!-- Mention how you would reproduce the bug if not mentioned on the issue page already. Also mention which screens are going to have the changes if applicable --> ## Further comments <!-- If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... --> Co-authored-by:
Tasso Evangelista <2263066+tassoevan@users.noreply.github.com>
-
- May 09, 2022
-
-
Tasso Evangelista authored
-
- Apr 14, 2022
-
-
Guilherme Gazzo authored
-
- Apr 06, 2022
-
-
Diego Sampaio authored
-