-
Notifications
You must be signed in to change notification settings - Fork 437
[INVESTIGATE] lastMessage incorrectly set as 'unread' when fetching room list #2569
Comments
@luismachado Good question! I think we added this additional interval just to make sure to have the latest data, but removing it should not affect the results on |
From what i've been able to see (still have to investigate this further), when this aforementioned endpoint returns the lastmessages, it will overwrite the data for each of those messages (if they were already downloaded previously). Has they come with the incorrect unread value the last message for each channel is going to be affected (if I open each channel I'm able to see the last message marked as unread for a slight moment and then is updated to read, because the Now, if I set the updatedSince to 0 I think that what will happen is that the no messages will be returned (because nothing changed since a 0 ago..) so it won't overwrite anything. However, that way I won't ever fetch anything from the server (unless I then opened the channel). |
@rafaelks just to update this thread: I've since found out that the What's happening is that the data returned by the server says that the lastMessages are unread:true (when I know for a fact that they are read). Even weirder is that the response only includes the So, for older messages they stand marked as read but newer ones, initially, always are returned as unread. |
@luismachado The |
@rafaelks hey. I explained myself incorrectly (again -.-'): I was trying to say that the updatedSince param wasn't needed to replicate/cause the issue :) Regarding the When you mention the Finally, as I mentioned I have a parallel issue opened on the server git and I provide more context (and a reply sample) here. |
@luismachado You're right, I just realized that we actually use the |
Hello,
So I'm trying to implement read marks on the subscription list (to extend the already existing functionally inside the rooms) but I'm facing some weird behaviour from the API (so this might not be an issue with the app but with the server so I'm sorry if that's the case).
What happens is that when calling
https://localhost:3000/api/v1/rooms.get?updatedSince=...]
all the lastMessages for each subscription comes with the unread parameter set to false (even thou the message was already read, which I can confirm if I fetch the message list for the subscription).Now, this also only happens because the updatedSince is set to a -100000 seconds timeframe from the server data (here). Why the 100000 seconds window?
Now I know reducing the time isn't a solution but I was curious on what might happen if I change the value.
The text was updated successfully, but these errors were encountered: