Adding device Id for version 2 of native apps (#5505)

* Adding device Id for version 2

* Changing ids
Этот коммит содержится в:
Corey Hulen
2017-02-23 08:53:43 -05:00
коммит произвёл Joram Wilander
родитель 3b0f7163ab
Коммит ca7d3b6e7b
5 изменённых файлов: 61 добавлений и 15 удалений

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

@@ -206,11 +206,6 @@ func attachDeviceId(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
if !(strings.HasPrefix(deviceId, model.PUSH_NOTIFY_APPLE+":") || strings.HasPrefix(deviceId, model.PUSH_NOTIFY_ANDROID+":")) {
c.SetInvalidParam("attachDevice", "deviceId")
return
}
// A special case where we logout of all other sessions with the same device id
if err := app.RevokeSessionsForDeviceId(c.Session.UserId, deviceId, c.Session.Id); err != nil {
c.Err = err