View of specific message
Opened this issue · 4 comments
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).
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.
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}
.
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.
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.