stacker.news
                                
                                 stacker.news copied to clipboard
                                
                                    stacker.news copied to clipboard
                            
                            
                            
                        Push notification "~undefined was transferred to you"
I received the push notification "~undefined was transferred to you" a few hours ago but I don't know what it is and it's not listed at my /notifications page.
Mhh, this is going to be interesting to find out. We are only sending out push notifications for territory transfers (a recently added feature, see #878) here:
https://github.com/stackernews/stacker.news/blob/179a539d4d2218be30095a153cf5d1d04839de7a/api/resolvers/sub.js#L285-L318
So afaict currently, we should only send out a push notification if the query succeeded :thinking:
But no territory transfer from today was inserted into the database.
Can you let us know when it happens again?
Can you let us know when it happens again?
For sure!
But no territory transfer from today was inserted into the database.
I think it happened around 3am BRT (UTC-3) but I'm not sure. I looked at my phone around 7am and (again) I think the notifications was saying "4 hours ago" or something. But I'm not sure because I was still sleepy and wasn't wearing my reading glasses, so I might be wrong.
Then I tapped the notification but it took me nowhere. I should've taken a screenshot before tapping it but I forgot. I was too sleepy
Can you let us know when it happens again?[
@ekzyis it didn't happen again. Should I close this issue?
Yes, you can
@ekzyis @huumn it happened again
The time is BRT (UTC-3)
I think this is a different issue than the one we just encountered. Sounds like it might be similar. Perhaps there are undefined values when territories are transferred.
Yes, the ticket is about sub.name being undefined in noteTerritoryTransfer. Will test the code more. There are only two places where noteTerritoryTransfer is called but can't find anything obviously wrong like what just happened:
Here:
https://github.com/stackernews/stacker.news/blob/b35302ccdc61d86d24fd09d7739311f6a17b035d/api/resolvers/sub.js#L284-L317
and here:
https://github.com/stackernews/stacker.news/blob/b35302ccdc61d86d24fd09d7739311f6a17b035d/api/resolvers/sub.js#L318-L371
I'm going to close this as we fixed the issue that reopened it and we can't reproduce or reason about the event that opened the ticket.