mirror of
https://github.com/tooot-app/app
synced 2024-12-22 07:34:06 +01:00
Fix push
This commit is contained in:
parent
d3d2202caa
commit
be4eaa93ee
@ -29,6 +29,8 @@ Please **do not** create a pull request to update translation. tooot's translati
|
||||
|
||||
[@janlindblom](https://github.com/janlindblom) for Swedish
|
||||
|
||||
[@ihoryan](https://crowdin.com/profile/ihoryan) for Ukrainian
|
||||
|
||||
[@duy@mas.to](https://mas.to/@duy) for Vietnamese translation
|
||||
|
||||
[@jimmyorz](https://github.com/jimmyorz) for Traditional Chinese translation
|
||||
|
@ -17,7 +17,6 @@ const openLink = async (url: string, navigation?: any) => {
|
||||
|
||||
const handleNavigation = (page: 'Tab-Shared-Toot' | 'Tab-Shared-Account', options: {}) => {
|
||||
if (navigation) {
|
||||
// @ts-ignore
|
||||
navigation.push(page, options)
|
||||
} else {
|
||||
// @ts-ignore
|
||||
|
@ -231,6 +231,9 @@
|
||||
"status": {
|
||||
"heading": "Toot from subscribed users"
|
||||
},
|
||||
"update": {
|
||||
"heading": "Reblog has been edited"
|
||||
},
|
||||
"admin.sign_up": {
|
||||
"heading": "Admin: sign up"
|
||||
},
|
||||
|
@ -62,10 +62,9 @@ const pushRegister = async (
|
||||
'BMn2PLpZrMefG981elzG6SB1EY9gU7QZwmtZ/a/J2vUeWG+zXgeskMPwHh4T/bxsD4l7/8QT94F57CbZqYRRfJo='
|
||||
)
|
||||
formData.append('subscription[keys][auth]', auth)
|
||||
Object.keys(alerts).map(key =>
|
||||
// @ts-ignore
|
||||
formData.append(`data[alerts][${key}]`, alerts[key].value.toString())
|
||||
)
|
||||
for (const [key, value] of Object.entries(alerts)) {
|
||||
formData.append(`data[alerts][${key}]`, value.toString())
|
||||
}
|
||||
|
||||
const res = await apiInstance<Mastodon.PushSubscription>({
|
||||
method: 'post',
|
||||
|
@ -10,10 +10,9 @@ export const updateInstancePushAlert = createAsyncThunk(
|
||||
alerts: InstanceLatest['push']['alerts']
|
||||
}): Promise<InstanceLatest['push']['alerts']> => {
|
||||
const formData = new FormData()
|
||||
Object.keys(alerts).map(alert =>
|
||||
// @ts-ignore
|
||||
formData.append(`data[alerts][${alert}]`, alerts[alert].value.toString())
|
||||
)
|
||||
for (const [key, value] of Object.entries(alerts)) {
|
||||
formData.append(`data[alerts][${key}]`, value.toString())
|
||||
}
|
||||
|
||||
await apiInstance<Mastodon.PushSubscription>({
|
||||
method: 'put',
|
||||
|
Loading…
Reference in New Issue
Block a user