1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-17 18:13:21 +02:00

Remove awkward subscription id

This commit is contained in:
binwiederhier 2023-02-12 14:09:44 -05:00
parent 9131d3d521
commit cc309e87e9
12 changed files with 67 additions and 104 deletions
web/src/components

View file

@ -100,11 +100,7 @@ export const useAutoSubscribe = (subscriptions, selected) => {
const subscription = await subscriptionManager.add(baseUrl, params.topic);
if (session.exists()) {
try {
const remoteSubscription = await accountApi.addSubscription({
base_url: baseUrl,
topic: params.topic
});
await subscriptionManager.setRemoteId(subscription.id, remoteSubscription.id);
await accountApi.addSubscription(baseUrl, params.topic);
} catch (e) {
console.log(`[Hooks] Auto-subscribing failed`, e);
if (e instanceof UnauthorizedError) {