Resolve unsub issue.
This commit is contained in:
@@ -101,13 +101,19 @@ export function* signOutStart() {
|
||||
logImEXEvent("redux_sign_out");
|
||||
|
||||
const state = yield select();
|
||||
console.log(yield getToken(messaging));
|
||||
|
||||
//unsub from topic.
|
||||
yield call(axios.post, "/notifications/unsubscribe", {
|
||||
fcm_tokens: yield getToken(messaging),
|
||||
imexshopid: state.user.bodyshop.imexshopid,
|
||||
type: "messaging",
|
||||
});
|
||||
|
||||
try {
|
||||
const fcm_tokens = yield getToken(messaging);
|
||||
yield call(axios.post, "/notifications/unsubscribe", {
|
||||
fcm_tokens,
|
||||
imexshopid: state.user.bodyshop.imexshopid,
|
||||
type: "messaging",
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("No FCM token. Skipping unsubscribe.");
|
||||
}
|
||||
|
||||
yield signOut(auth);
|
||||
yield put(signOutSuccess());
|
||||
|
||||
Reference in New Issue
Block a user