[NEW] Mark message as unread#1039
Conversation
|
@diegolmello @IlarionHalushka can someone review please? |
|
@djorkaeffalexandre Hi Possible to review it or assign a reviewer? |
diegolmello
left a comment
There was a problem hiding this comment.
Just a few adjustments.
Thanks!
|
|
diegolmello
left a comment
There was a problem hiding this comment.
What are your main language?
Don't add translation from Google Translate for languages you're not sure.
You can leave pt-BR and en, but you probably don't speak de, zh-cn, fr and ru.
It's always better to have no translation and fallback to en than having a wrong translation.
|
@diegolmello Gotcha, my main language is Chinese and English, so I will keep |
|
@diegolmello I removed other language and only kept english and chinese translation |
|
@diegolmello is it good now? Can you review it please 🕺 |
|
@weijia-yu Sure. Thanks! |
| toggleRead(read, roomId, firstUnreadMessageId) { | ||
| if (read) { | ||
| return this.sdk.post('subscriptions.unread', { roomId }); | ||
| if (roomId !== undefined) { |
There was a problem hiding this comment.
just do if (roomId) {
| if (roomId !== undefined) { | ||
| return this.sdk.post('subscriptions.unread', { roomId }); | ||
| } | ||
| if (firstUnreadMessageId !== undefined) { |
There was a problem hiding this comment.
just do if (firstUnreadMessageId) {
diegolmello
left a comment
There was a problem hiding this comment.
Can you also resolve Ilarion's inputs?
Thanks!
| return this.sdk.post('rooms.favorite', { roomId, favorite }); | ||
| }, | ||
| toggleRead(read, roomId) { | ||
| toggleRead(read, roomId, firstUnreadMessageId) { |
There was a problem hiding this comment.
Can you switch this signature to toggleRead({ read = true, rid, messageId })?
This way is much more readable.
Before:
RocketChat.toggleRead(true, undefined, actionMessage._id);After:
RocketChat.toggleRead({ messageId : actionMessage._id });There was a problem hiding this comment.
Before:
const result = await RocketChat.toggleRead(isRead, rid);After:
const result = await RocketChat.toggleRead({ rid, read: isRead });|
Was done by #1785. |

@RocketChat/ReactNative
Closes #989