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

IM/DM messages sorting relies only on ts, unlike group messages #34008

Open
MahmoudMowiena opened this issue Nov 20, 2024 · 7 comments · May be fixed by #34009
Open

IM/DM messages sorting relies only on ts, unlike group messages #34008

MahmoudMowiena opened this issue Nov 20, 2024 · 7 comments · May be fixed by #34009
Labels
Feature: Request Requested Feature Tasked Added to the internal issue tracking

Comments

@MahmoudMowiena
Copy link

Description:

Sorting for IM/DM messages currently uses only the ts (timestamp) field, whereas group messages support sorting by multiple parameters. This inconsistency limits flexibility and prevents custom sorting options for direct and instant messages.

Steps to reproduce:

  1. Query for IM/DM messages using the Rocket.Chat API or interface.
  2. Attempt to use sorting parameters (e.g., by sender or custom fields).
  3. Observe that the sorting relies solely on the ts timestamp.

Expected behavior:

IM/DM messages should support sorting by multiple parameters, similar to group messages, to allow consistent and customizable sorting behavior.

Actual behavior:

IM/DM messages are sorted only by the ts timestamp, regardless of the specified parameters.

Additional context

This issue creates inconsistency between group and IM/DM sorting functionality. Fixing this will align the behavior across all message types.

MahmoudMowiena added a commit to MahmoudMowiena/Rocket.Chat that referenced this issue Nov 20, 2024
Previously, the sorting for IM/DM messages relied only on the `ts` timestamp.
This fix updates the logic to allow sorting by multiple parameters, similar
to group messages, enhancing consistency across message types.

Closes RocketChat#34008
@reetp
Copy link

reetp commented Nov 20, 2024

This is really a feature request - the system isn't broken but just doesn't work the way you want it to.

I'll refer it to the team but have no idea if this is something they want to fix or have another solution. I know there are various things happening regarding upgrading the interface so they may already have something in hand - and why you should always ask in the forums or on open before wasting time trying to fix things.

Note that PRs can take a LONG time to get reviewed so don't expect anything back in a hurry.

Thanks.

@reetp reetp added Feature: Request Requested Feature Tasked Added to the internal issue tracking labels Nov 20, 2024
@MahmoudMowiena
Copy link
Author

@reetp Thank you for your reply! I would like to highlight that, according to the documentation, the sorting parameter is supposed to work with any property, not just the ts timestamp. That’s why I initially reported it as a bug. I would appreciate any clarification on this.

@reetp
Copy link

reetp commented Nov 20, 2024

You don't need to @ people thanks - it just gets annoying.

Where does it say it in the docs? It may be that the docs need fixing.

@MahmoudMowiena
Copy link
Author

Regarding the IM messages retrieval: https://developer.rocket.chat/apidocs/list-dm-messages
and regarding the Groups messages retrieval: https://developer.rocket.chat/apidocs/get-group-messages
You would clearly see that the sorting param, as per the documentation, should work with any property, however that's not the case.

@reetp
Copy link

reetp commented Nov 20, 2024

Thanks.

I'll ask the team to review it.

As per my previous, don't expect any response in a hurry!

@MahmoudMowiena
Copy link
Author

Thanks for your time.

@casalsgh
Copy link
Contributor

Thanks for reporting and the contribution; will ask folks to review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Request Requested Feature Tasked Added to the internal issue tracking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants