views¶
Functions
- intranet.apps.notifications.views.android_setup_view(request)[source]¶
Set up a GCM session. This does not require a valid login session. Instead, a token from the client session is sent to the Android backend, which queries a POST request to this view.
The “android_gcm_rand” is randomly set when the Android app is detected through the user agent. If it has the same value, it is assumed to be correct.
- intranet.apps.notifications.views.chrome_getdata_view(request)[source]¶
Get the data of the last notification sent to the current user.
This is needed because Chrome, as of version 44, doesn’t support sending a data payload to a notification. Thus, information on what the notification is actually for must be manually fetched.