diff --git a/CHANGELOG b/CHANGELOG index b3246fdc6..6c37b9bd0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2020-10-16 Version: patch +- Supported AndroidNotificationNotifyId for Push and MassPush. +- Supported iOSNotificationCollapseId for Push and MassPush. + 2020-10-16 Version: patch - Support create for serverlesshbase. diff --git a/push/include/alibabacloud/push/model/MassPushRequest.h b/push/include/alibabacloud/push/model/MassPushRequest.h index 9867223e8..0a7421a3a 100644 --- a/push/include/alibabacloud/push/model/MassPushRequest.h +++ b/push/include/alibabacloud/push/model/MassPushRequest.h @@ -69,10 +69,12 @@ namespace AlibabaCloud std::string androidXiaoMiNotifyBody; std::string iOSSubtitle; bool iOSRemind; + int androidNotificationNotifyId; std::string targetValue; std::string androidMusic; std::string androidXiaoMiActivity; std::string androidXiaoMiNotifyTitle; + std::string iOSNotificationCollapseId; std::string pushType; }; diff --git a/push/include/alibabacloud/push/model/PushRequest.h b/push/include/alibabacloud/push/model/PushRequest.h index 8dfc37908..37eeb1f75 100644 --- a/push/include/alibabacloud/push/model/PushRequest.h +++ b/push/include/alibabacloud/push/model/PushRequest.h @@ -89,6 +89,8 @@ namespace AlibabaCloud void setIOSRemind(bool iOSRemind); std::string getAndroidMusic()const; void setAndroidMusic(const std::string& androidMusic); + std::string getIOSNotificationCollapseId()const; + void setIOSNotificationCollapseId(const std::string& iOSNotificationCollapseId); std::string getPushType()const; void setPushType(const std::string& pushType); std::string getAndroidExtParameters()const; @@ -123,6 +125,8 @@ namespace AlibabaCloud void setAndroidActivity(const std::string& androidActivity); std::string getSmsSignName()const; void setSmsSignName(const std::string& smsSignName); + int getAndroidNotificationNotifyId()const; + void setAndroidNotificationNotifyId(int androidNotificationNotifyId); long getAppKey()const; void setAppKey(long appKey); std::string getTargetValue()const; @@ -160,6 +164,7 @@ namespace AlibabaCloud std::string iOSSubtitle_; bool iOSRemind_; std::string androidMusic_; + std::string iOSNotificationCollapseId_; std::string pushType_; std::string androidExtParameters_; int iOSBadge_; @@ -177,6 +182,7 @@ namespace AlibabaCloud bool androidRemind_; std::string androidActivity_; std::string smsSignName_; + int androidNotificationNotifyId_; long appKey_; std::string targetValue_; std::string androidXiaoMiActivity_; diff --git a/push/src/model/MassPushRequest.cc b/push/src/model/MassPushRequest.cc index 9ec78a142..6fe9e624d 100644 --- a/push/src/model/MassPushRequest.cc +++ b/push/src/model/MassPushRequest.cc @@ -85,10 +85,12 @@ void MassPushRequest::setPushTask(const std::vector& pushTask) setParameter(pushTaskObjStr + ".AndroidXiaoMiNotifyBody", pushTaskObj.androidXiaoMiNotifyBody); setParameter(pushTaskObjStr + ".IOSSubtitle", pushTaskObj.iOSSubtitle); setParameter(pushTaskObjStr + ".IOSRemind", pushTaskObj.iOSRemind ? "true" : "false"); + setParameter(pushTaskObjStr + ".AndroidNotificationNotifyId", std::to_string(pushTaskObj.androidNotificationNotifyId)); setParameter(pushTaskObjStr + ".TargetValue", pushTaskObj.targetValue); setParameter(pushTaskObjStr + ".AndroidMusic", pushTaskObj.androidMusic); setParameter(pushTaskObjStr + ".AndroidXiaoMiActivity", pushTaskObj.androidXiaoMiActivity); setParameter(pushTaskObjStr + ".AndroidXiaoMiNotifyTitle", pushTaskObj.androidXiaoMiNotifyTitle); + setParameter(pushTaskObjStr + ".IOSNotificationCollapseId", pushTaskObj.iOSNotificationCollapseId); setParameter(pushTaskObjStr + ".PushType", pushTaskObj.pushType); } } diff --git a/push/src/model/PushRequest.cc b/push/src/model/PushRequest.cc index 6499e55dc..ef9e12ad8 100644 --- a/push/src/model/PushRequest.cc +++ b/push/src/model/PushRequest.cc @@ -324,6 +324,17 @@ void PushRequest::setAndroidMusic(const std::string& androidMusic) setParameter("AndroidMusic", androidMusic); } +std::string PushRequest::getIOSNotificationCollapseId()const +{ + return iOSNotificationCollapseId_; +} + +void PushRequest::setIOSNotificationCollapseId(const std::string& iOSNotificationCollapseId) +{ + iOSNotificationCollapseId_ = iOSNotificationCollapseId; + setParameter("IOSNotificationCollapseId", iOSNotificationCollapseId); +} + std::string PushRequest::getPushType()const { return pushType_; @@ -511,6 +522,17 @@ void PushRequest::setSmsSignName(const std::string& smsSignName) setParameter("SmsSignName", smsSignName); } +int PushRequest::getAndroidNotificationNotifyId()const +{ + return androidNotificationNotifyId_; +} + +void PushRequest::setAndroidNotificationNotifyId(int androidNotificationNotifyId) +{ + androidNotificationNotifyId_ = androidNotificationNotifyId; + setParameter("AndroidNotificationNotifyId", std::to_string(androidNotificationNotifyId)); +} + long PushRequest::getAppKey()const { return appKey_;