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

View of specific message #179

Open
33mhz opened this issue Aug 31, 2018 · 4 comments
Open

View of specific message #179

33mhz opened this issue Aug 31, 2018 · 4 comments

Comments

@33mhz
Copy link
Contributor

33mhz commented Aug 31, 2018

Is your feature request related to a problem? Please describe.
I'd like to be able to open a page to a specific message, like we can currently pull up a specific post.

Describe the solution you'd like
I'd like a URL to specify a message location, like /@{username}/posts/{post_id} and /posts/{post_id} for posts.

Describe alternatives you've considered
Adding an id to each item in a list and then specifying /messages/{room_id}#{message_id} is a start, though of course only works if the message is initially loaded. (and the header bar blocks the targeted message).

@sunya9
Copy link
Owner

sunya9 commented Aug 31, 2018

Sounds good. But that is inconveniences in case of the target messages does not be included in initial loading.
If you would like to reference target messages directly from URL, it must be included at the stage of SSR but the server cannot find a hash.
For that, I think that it is better to use query string instead of the hash, like /messages/{room_id}?message={message_id}.
After, it will realize to use paginate.

@33mhz
Copy link
Contributor Author

33mhz commented Aug 31, 2018

Yeah, that's why the alternative isn't a good option. I think /messages/{room_id}/{message_id} would be fine, maybe confusing to look at though. Or even /message/{message_id}.

@sunya9
Copy link
Owner

sunya9 commented Aug 31, 2018

I feel that /messages/{room_id}/{message_id} is appropriate URL if show as single message page. As post pages are so.
(resemble @<screen_name>/posts/)
/message/{message_id} are also so, this looks like canonical URL. (resemble /posts/)

But many people would like to view not only the target message but also its before and after probably.
So, it should implement the initial rendering that based on the target message id.

Fortunately, pagination query strings are used in users, posts, and other. If implement to list.vue the feature that load the messages from the middle, it will be also able to apply to another API used the paginate.

@33mhz
Copy link
Contributor Author

33mhz commented Feb 13, 2020

Another option for this feature would be to simply load /message/{message_id} using the GET /channels/{channel_id}/messages/{message_id}/thread endpoint. This would be paginated identically to /posts/{post_id} threads are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants