mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Bump
This commit is contained in:
@ -14,7 +14,7 @@ export type Params = {
|
||||
|
||||
export const TOOOT_API_DOMAIN = mapEnvironment({
|
||||
release: 'api.tooot.app',
|
||||
candidate: 'api-candidate.tooot.app',
|
||||
candidate: 'api.tooot.app',
|
||||
development: 'api-development.tooot.app'
|
||||
})
|
||||
|
||||
|
@ -11,16 +11,24 @@ export const updateExpoToken = async (): Promise<string> => {
|
||||
await setChannels()
|
||||
}
|
||||
|
||||
if (isDevelopment) {
|
||||
setGlobalStorage('app.expo_token', 'ExponentPushToken[DEVELOPMENT_1]')
|
||||
return 'ExponentPushToken[DEVELOPMENT_1]'
|
||||
}
|
||||
const getAndSetToken = () =>
|
||||
Notifications.getExpoPushTokenAsync({
|
||||
projectId: '3288313f-3ff0-496a-a5a9-d8985e7cad5f',
|
||||
applicationId: 'com.xmflsct.app.tooot'
|
||||
}).then(({ data }) => {
|
||||
setGlobalStorage('app.expo_token', data)
|
||||
return data
|
||||
})
|
||||
|
||||
return await Notifications.getExpoPushTokenAsync({
|
||||
experienceId: '@xmflsct/tooot',
|
||||
applicationId: 'com.xmflsct.app.tooot'
|
||||
}).then(({ data }) => {
|
||||
setGlobalStorage('app.expo_token', data)
|
||||
return data
|
||||
})
|
||||
if (expoToken?.length) {
|
||||
getAndSetToken()
|
||||
return Promise.resolve(expoToken)
|
||||
} else {
|
||||
if (isDevelopment) {
|
||||
setGlobalStorage('app.expo_token', 'ExponentPushToken[DEVELOPMENT_1]')
|
||||
return Promise.resolve('ExponentPushToken[DEVELOPMENT_1]')
|
||||
}
|
||||
|
||||
return await getAndSetToken()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user