Skip to content

Commit

Permalink
feat(federation): Also utilize returned data from DELETE /read
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Feb 28, 2024
1 parent e1ec021 commit a312ce8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/store/conversationsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,8 @@ const actions = {
return
}

await setConversationUnread(token)
commit('updateUnreadMessages', { token, unreadMessages: 1 })
await dispatch('fetchConversation', { token })
const response = await setConversationUnread(token)
await dispatch('addConversation', response.data.ocs.data)
},

async updateLastCommonReadMessage({ commit, getters }, { token, lastCommonReadMessage }) {
Expand Down
2 changes: 1 addition & 1 deletion src/store/messagesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ const actions = {
*/
async clearLastReadMessage(context, { token, updateVisually = false }) {
const conversation = context.getters.conversations[token]
if (!conversation || !conversation.lastMessage) {
if (!conversation/* FIXME || !conversation.lastMessage*/) {

Check failure on line 826 in src/store/messagesStore.js

View workflow job for this annotation

GitHub Actions / NPM lint

Expected space or tab before '*/' in comment
return
}
// set the id to the last message
Expand Down

0 comments on commit a312ce8

Please sign in to comment.