Merge remote-tracking branch 'origin/develop' into settings-changed

* origin/develop:
  fix fontello
  Translated using Weblate (Russian)
  Translated using Weblate (Italian)
  lint fix
  fixed copy-pasting leftovers
  improved algorithm, possibly speed too
  fix 8x spaces inside this paren
  feat/reorder-emojis-by-position-of-keyword
  rename to gravestone
  Apply 1 suggestion(s) to 1 file(s)
  change i18n phrasing
  separate reply button to its own component, add changelog entry
  add basic deletes support that works with masto WS
This commit is contained in:
Henry Jameson 2020-10-17 21:26:13 +03:00
commit a664fde02f
16 changed files with 127 additions and 26 deletions

View file

@ -72,6 +72,8 @@ const api = {
showImmediately: timelineData.visibleStatuses.length === 0,
timeline: 'friends'
})
} else if (message.event === 'delete') {
dispatch('deleteStatusById', message.id)
} else if (message.event === 'pleroma:chat_update') {
dispatch('addChatMessages', {
chatId: message.chatUpdate.id,

View file

@ -611,6 +611,10 @@ const statuses = {
commit('setDeleted', { status })
apiService.deleteStatus({ id: status.id, credentials: rootState.users.currentUser.credentials })
},
deleteStatusById ({ rootState, commit }, id) {
const status = rootState.statuses.allStatusesObject[id]
commit('setDeleted', { status })
},
markStatusesAsDeleted ({ commit }, condition) {
commit('setManyDeleted', condition)
},