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

View file

@ -299,11 +299,7 @@ export const subscribeTopic = async (baseUrl, topic) => {
const subscription = await subscriptionManager.add(baseUrl, topic);
if (session.exists()) {
try {
const remoteSubscription = await accountApi.addSubscription({
base_url: baseUrl,
topic: topic
});
await subscriptionManager.setRemoteId(subscription.id, remoteSubscription.id);
await accountApi.addSubscription(baseUrl, topic);
} catch (e) {
console.log(`[SubscribeDialog] Subscribing to topic ${topic} failed`, e);
if (e instanceof UnauthorizedError) {