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.

intranet.apps.notifications.views.chrome_setup_view(request)[source]

Set up a browser-side GCM session. This requires a valid login session. A “token” POST parameter is saved under the “gcm_token” parameter in the logged in user’s NotificationConfig.

intranet.apps.notifications.views.gcm_list_view(request)[source]
intranet.apps.notifications.views.gcm_post(nc_users, data, user=None, request=None)[source]
intranet.apps.notifications.views.gcm_post_view(request)[source]
intranet.apps.notifications.views.get_gcm_schedule_uids()[source]