Age | Commit message (Collapse) | Author |
|
Signed-off-by: marco <marcoambrosini@pm.me>
|
|
Signed-off-by: marco <marcoambrosini@pm.me>
|
|
Signed-off-by: marco <marcoambrosini@pm.me>
|
|
Signed-off-by: marco <marcoambrosini@pm.me>
|
|
Signed-off-by: marco <marcoambrosini@pm.me>
|
|
Signed-off-by: marco <marcoambrosini@pm.me>
|
|
Signed-off-by: marco <marcoambrosini@pm.me>
|
|
Signed-off-by: marco <marcoambrosini@pm.me>
|
|
Signed-off-by: marco <marcoambrosini@pm.me>
|
|
Signed-off-by: marco <marcoambrosini@pm.me>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
accept SHA256 hash sums for reference id as documented
|
|
- also use them for chat
- cf. https://github.com/nextcloud/spreed/blob/40caf331092c9dd5d23f1365d7fb4f0768d06b50/docs/chat.md
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
|
|
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
|
|
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
|
|
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
|
|
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
|
|
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
Whenever there are several pages of unread messages, the
"lookForNewMessages()" call will not return all the results at once.
In case there are results left to load, the read marker is not reset by
the false when "isSticky" (aka scrolled to bottom) happens.
When loading new messages, we now only increase the conversation counter
when the latter was out of sync with the current messages list.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
When switching between regular mode and call mode, the two MessagesList
view instances are concurrently disturbing each other's
lookForNewMessages call.
To fix this, we now introduce a requestId for those requests to which we
pass in the chatIdentifier, extended by a generated view id. This brings
back the old behavior for now.
In the future we should look into keeping the polling request and
sharing it between the two Vues, which requires some refactoring of the
polling logic and timeouts.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Minor fixes to messagesStore unread messages counter logic.
Added tests for all cases.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
When fetching new messages in the current conversation, also scan them
for mentions to update the conversation store's unreadMention flag if
necessary.
This makes a mention notification or the counter bubble highlight
color update more quickly without having to wait for the conversation
list reload.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
As soon as we receive new messages from the "lookForNewMessages"
action, they are counted and added to the number of known unread
messages.
This makes the store update and counter in the left sidebar update more
quickly.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
|
|
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
|
|
When sending multiple messages in a row, and all are pending or time
out, they each need a specific cancel function to match their specific
request.
Fixes issue where one message timing out would cancel the other messages
as well.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Removes the store usage in messagesService
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Move fetchMessages and lookForNewMessages to store actions, including
logic for cancelling them.
Removed store usage for these functions in messagesService and moved it
to the store actions.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
|
|
Since createTemporaryMessage heavily depends on a store, moved it into a
messagesStore action to decouple it from the global store module.
Note: even though it's synchronous, the dispatch() function returns a
promise so we need to treat it as if it was async.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Re-fetch conversation only when marking as unread, as it's the
only scenario where unreadMessages and other values cannot be
computed cheaply on the client side.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Fix error related to unavailable upload menu.
Don't send request for updating read marker on server in guest mode.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Re-fetching makes sure that harder to compute values are re-fetched from
the server like unreadMessages, unreadMention, etc.
This introduces a new store action "fetchConversation".
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
When posting new messages, the read marker UI will also be updated.
Fixed read marker update when scrolled to bottom.
Fixed warnings related to temporary message id being a string.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
To avoid jumping around when updating the lastReadMessage property, its
last value is now cached in visualLastReadMessageId in the
messagesStore. The marker always keeps its position until the user
focusses away then back. In the latter case the marker position is
refreshed based on the last backend/store state.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
When no scrolling is possible, add delay before clearing.
Small related code cleanup.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
When joining a conversation, don't mark it as read any more.
The only moment will be when scrolling down to the bottom of a
conversation and when clearing the read marker, in which case we
immediately update the store.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Moved marker behavior from server to client by passing setReadMarker=0
to queries.
Added scroll handler that detects whether the read marker was seen and
scrolled past, if yes it will set the read marker to the first message
visible at the top.
Keep the marker when the document is not focussed.
When opening a conversation, scrolls to the read marker.
The lastMessage attribute of a conversation is now updated earlier to
make sure the read marker can update properly when there are new
messages appended.
Instead of waiting for the next refresh cycle, this fix immediately
updates lastMessage and lastReadMessage after posting a message.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
|
Signed-off-by: Joas Schilling <coding@schilljs.com>
|