OTTAA-Project / ottaa_project_flutter

Join us to create the first predictive augmentative communication platform for speech-impaired children!
https://ottaa-project.github.io/
GNU General Public License v3.0
10 stars 4 forks source link

[Bug]: Get Link code via Notification #223

Closed Da-PC closed 1 year ago

Da-PC commented 1 year ago

Contact Details

No response

Branch name

development

Flutter & Dart version

Flutter version 3.7.3 stable Dart 2.19.2

How are you running it?

My steps are

When linking 2 accounts the link token email goes to SPAM.

What happened?

A bug happened!

Where are you seeing the problem on?

Chrome (WebApp), Android, iOS

Relevant log output

No response

Code of Conduct

emirchus commented 1 year ago

Ready

hectoritr commented 1 year ago

Great will test it and merge it!

Da-PC commented 1 year ago

image

Getting this error on my account, but I receive the Notification with text "Estan intentando vincular tu cuenta con el codigo XXXX"

emirchus commented 1 year ago

@lopezjuanma96 do u have any idea about this?

lopezjuanma96 commented 1 year ago

Yes it was from the device token error, it shows when the device token provided for the notification does not existed. I just added a catch on the cloud to skip those devices that throw this error and instead raised a new error if no device tokens were found or all device tokens were invalid. I'll add it to the POSTMAN docs and we can add a message on those cases to ask the user to re-login and see if that updates the device token data.

lopezjuanma96 commented 1 year ago

@emirchus On some devices the notification needs several attempts to be received. The Cloud function is sending an okey status so it might be something happening with the app or the device itself.

For what we've tested on these devices we think the notification is not received when app is open, it is sometimes received if the app is exeecuted on background (minimized) and always received if app is closed. But these just might be what we concluded from specific tests.

Also most devices don't apply text formatting with html tags so we will remove the from link token.

lopezjuanma96 commented 1 year ago

@emirchus Another thing, some devices require permissions for notifications, we should find a way to asks those permissions on login or download