Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions runtimes/nodejs/actions/send-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
* @param {string} appGuid - appGuid to create webhook
* @param {string} appSecret - appSecret of the application
* @param {string} url - An optional URL that can be sent along with the alert. Eg : -p url "https:\\www.mycompany.com".
* @param {string} apiHost - An optional string that specifies the API host. The default is 'mobile.ng.bluemix.net'. Eg : -p apiHost "mobile.eu-gb.bluemix.net".
* @param {string} apiHost - An optional string that specifies the API host. The default is 'mobile.ng.bluemix.net'. Eg : -p apiHost "mobile.eu-gb.bluemix.net" for UK region, -p apiHost "jp-tok.imfpush.cloud.ibm.com" for Tokyo.
* @param {object} text - The notification message to be shown to the user. Eg: -p text "Hi ,OpenWhisk send a notification"
* @param {string} deviceIds - Send notification to the list of specified devices. Eg: -p deviceIds "["deviceID1"]"
* @param {object} platforms - Send notification to the devices of the specified platforms. 'A' for apple (iOS) devices and 'G' for google (Android) devices. Eg: -p platforms ["A"]
* @param {object} userIds - Send notification to the devices of the specified users. Eg: -p userIds ["testUser"]
* @param {string} tagNames - Send notification to the devices that have subscribed to any of these tags. Eg -p tagNames "["tag1"]"

* @param {string} gcmCollapseKey - This parameter identifies a group of messages.
* @param {string} gcmTitleKey - Title for the android notification.
* @param {string} gcmCategory - The category identifier to be used for the interactive push notifications.
* @param {string} gcmIcon - Specify the name of the icon to be displayed for the notification. Make sure the icon is already packaged with the client application.
* @param {string} gcmDelayWhileIdle - When this parameter is set to true, it indicates that the message should not be sent until the device becomes active.
Expand Down Expand Up @@ -61,6 +62,7 @@
* @param {string} apnstitle - The title of Rich Push notifications (Supported only on iOS 10 and above).
* @param {string} apnsSubtitle - The subtitle of the Rich Notifications. (Supported only on iOS 10 and above).
* @param {string} apnsAttachmentUrl - The link to the iOS notifications media (video, audio, GIF, images - Supported only on iOS 10 and above).
* @param {string} apnsCollapseId - Multiple notifications with the same collapse identifier are displayed to the user as a single notification.

* @param {string} fireFoxTitle - Specifies the title to be set for the WebPush Notification.
* @param {string} fireFoxIconUrl - The URL of the icon to be set for the WebPush Notification.
Expand Down Expand Up @@ -112,13 +114,13 @@ async function main(params) {
const {
apnsBadge, apnsCategory, apnsActionKeyTitle, apnsSound, apnsPayload, apnsType, apnsTitleLocKey,
apnsLocKey, apnsLaunchImage, apnsTitleLocArgs, apnsLocArgs, apnstitle, apnsSubtitle,
apnsAttachmentUrl,
apnsAttachmentUrl, apnsCollapseId,
} = theParams;

// gcm settings
const {
gcmCollapseKey, gcmDelayWhileIdle, gcmPayload, gcmPriority, gcmSound, gcmTimeToLive,
gcmSync, gcmVisibility, gcmCategory, gcmIcon,
gcmSync, gcmVisibility, gcmCategory, gcmIcon, gcmTitleKey,
} = theParams;

// GCM Style settings
Expand Down Expand Up @@ -230,6 +232,9 @@ async function main(params) {
if (apnsAttachmentUrl) {
apns.attachmentUrl = apnsAttachmentUrl;
}
if (apnsCollapseId) {
apns.apnsCollapseId = apnsCollapseId;
}

if (!isEmpty(apns)) {
sendMessage.settings = {};
Expand All @@ -241,6 +246,9 @@ async function main(params) {
if (gcmCollapseKey) {
gcm.collapseKey = gcmCollapseKey;
}
if (gcmTitleKey) {
gcm.androidTitle = gcmTitleKey;
}
if (gcmDelayWhileIdle) {
gcm.delayWhileIdle = gcmDelayWhileIdle;
}
Expand Down
9 changes: 5 additions & 4 deletions tools/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ UTILDIR="$ROOTDIR/../incubator-openwhisk-utilities"
export OPENWHISK_HOME=$WHISKDIR

IMAGE_PREFIX="testing"
IMAGE_TAG="nightly"

#pull down images
docker pull openwhisk/controller
docker tag openwhisk/controller ${IMAGE_PREFIX}/controller
docker pull openwhisk/invoker
docker tag openwhisk/invoker ${IMAGE_PREFIX}/invoker
docker pull openwhisk/controller:${IMAGE_TAG}
docker tag openwhisk/controller:${IMAGE_TAG} ${IMAGE_PREFIX}/controller
docker pull openwhisk/invoker:${IMAGE_TAG}
docker tag openwhisk/invoker:${IMAGE_TAG} ${IMAGE_PREFIX}/invoker

# Build OpenWhisk
cd $OPENWHISK_HOME
Expand Down