diff --git a/README.md b/README.md
index bcac27c9..5aedd604 100644
--- a/README.md
+++ b/README.md
@@ -50,9 +50,7 @@
- download by entering `tools/` and running `python3 download_ruffle.py`
### also of note for anyone running this fork
-- aside from the stuff mentioned above, the following features will require patches to work:
- - mfm ([patch](https://git.notfire.cc/notfire/iceshrimp-patches/src/branch/main/0004-mfm-in-mastoapi.patch))
- - previewing posts ([patch](https://git.notfire.cc/notfire/iceshrimp-patches/src/branch/main/0005-previews-in-mastoapi.patch))
+n/a
---
diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js
index d083aea2..34b317f7 100644
--- a/src/components/notification/notification.js
+++ b/src/components/notification/notification.js
@@ -136,6 +136,10 @@ const Notification = {
})
return isFiltered
+ },
+ biteBack () {
+ let id = this.notification.bite_back_id
+ return this.$store.state.api.backendInteractor.biteBack({ id })
}
},
computed: {
diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index 93cbdf27..175c1206 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -111,7 +111,7 @@
{{ ' ' }}
{{ $t('notifications.follow_request') }}
-
+
{{ $t('notifications.bit_note') }}
+
+
+ {{ ' ' }}
+ {{ $t('notifications.bit_back') }}
+
+
`/api/v1/accounts/${id}/block`
const MASTODON_UNBLOCK_USER_URL = id => `/api/v1/accounts/${id}/unblock`
const MASTODON_MUTE_USER_URL = id => `/api/v1/accounts/${id}/mute`
const MASTODON_UNMUTE_USER_URL = id => `/api/v1/accounts/${id}/unmute`
+const MASTODON_BITE_BACK_URL = id => `/api/v1/bites/${id}/bite_back`
const MASTODON_BITE_USER_URL = id => `/api/v1/users/${id}/bite`
const MASTODON_BITE_NOTE_URL = id => `/api/v1/statuses/${id}/bite`
const MASTODON_REMOVE_USER_FROM_FOLLOWERS = id => `/api/v1/accounts/${id}/remove_from_followers`
@@ -316,6 +317,13 @@ const unblockUser = ({ id, credentials }) => {
}).then((data) => data.json())
}
+const biteBack = ({ id, credentials }) => {
+ return fetch(MASTODON_BITE_BACK_URL(id), {
+ headers: authHeaders(credentials),
+ method: 'POST'
+ }).then((data) => data.json())
+}
+
const biteUser = ({ id, credentials }) => {
return fetch(MASTODON_BITE_USER_URL(id), {
headers: authHeaders(credentials),
@@ -330,7 +338,6 @@ const biteNote = ({ id, credentials }) => {
}).then((data) => data.json())
}
-
const removeUserFromFollowers = ({ id, credentials }) => {
return fetch(MASTODON_REMOVE_USER_FROM_FOLLOWERS(id), {
headers: authHeaders(credentials),
@@ -1786,6 +1793,7 @@ const apiService = {
unmuteConversation,
blockUser,
unblockUser,
+ biteBack,
biteUser,
biteNote,
removeUserFromFollowers,
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index 69f84158..9394a828 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -426,11 +426,16 @@ export const parseNotification = (data) => {
}
if (output.type === 'bite') {
output.target = parseUser(data.account)
+ output.bite_back = false
+ if (data.bite)
+ output.bite_back_id = data.bite.id
if (data.status) {
output.type = "bite_note"
output.status = parseStatus(data.status)
output.action = output.status // TODO: Refactor, this is unneeded
+ } else if (data.bite && data.bite.bite_back) {
+ output.bite_back = true
}
}
output.from_profile = parseUser(data.account)
diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js
index 4902fc3f..81847c59 100644
--- a/src/services/notification_utils/notification_utils.js
+++ b/src/services/notification_utils/notification_utils.js
@@ -18,6 +18,7 @@ export const visibleTypes = store => {
rootState.config.notificationVisibility.polls && 'poll',
rootState.config.notificationVisibility.bites && 'bite',
rootState.config.notificationVisibility.bites && 'bite_note',
+ rootState.config.notificationVisibility.bites && 'bite_back',
rootState.config.notificationVisibility.followRequest && 'follow_request_accepted',
rootState.config.notificationVisibility.edits && 'update'
].filter(_ => _))
@@ -112,6 +113,9 @@ export const prepareNotificationObject = (notification, i18n, store) => {
case 'bite_note':
i18nString = 'bit_note'
break
+ case 'bite_back':
+ i18nString = 'bit_back'
+ break
case 'follow_request_accepted':
i18nString = 'follow_request_accepted'
break