I am using firebase presence to detect if someone is online or not and when someone goes offline I do some cleanup via a firebase function that triggers when they go offline.
Currently, if someone goes from wifi to cellular it triggers firebase presence onDisconnect to be called so they go offline which triggers the cleanup which in this case I do not want since they are just switching from wifi to cellular.
Any way I can cleanly handle this?