Этот коммит содержится в:
Corey Hulen
2017-03-01 12:33:16 -05:00
коммит произвёл GitHub
родитель 71e6a423e8
Коммит 633e894e4f
2 изменённых файлов: 80 добавлений и 4 удалений

Просмотреть файл

@@ -49,10 +49,11 @@ func (me *PushNotification) ToJson() string {
func (me *PushNotification) SetDeviceIdAndPlatform(deviceId string) {
parts := strings.Split(deviceId, ":")
if len(parts) == 2 {
me.Platform = parts[0]
me.DeviceId = parts[1]
index := strings.Index(deviceId, ":")
if index > -1 {
me.Platform = deviceId[:index]
me.DeviceId = deviceId[index+1:]
}
}