Skip to content

Commit e6941af

Browse files
committed
remove unneeded variable
1 parent 7feedda commit e6941af

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

server/server.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,18 @@ func (s *Server) handleSendNotification(w http.ResponseWriter, r *http.Request)
196196
// Parse the app version if available
197197
index := strings.Index(msg.Platform, "-v")
198198
platform := msg.Platform
199-
appVersion := 1
199+
msg.AppVersion = 1
200200
if index > -1 {
201201
msg.Platform = platform[:index]
202202
appVersionString := platform[index+2:]
203203
version, e := strconv.Atoi(appVersionString)
204204
if e == nil {
205-
appVersion = version
205+
msg.AppVersion = version
206206
} else {
207207
rMsg := fmt.Sprintf("Could not determine the app version in %v appVersion=%v", msg.Platform, appVersionString)
208208
s.logger.Error(rMsg)
209209
}
210210
}
211-
msg.AppVersion = appVersion
212211

213212
if server, ok := s.pushTargets[msg.Platform]; ok {
214213
rMsg := server.SendNotification(msg)

0 commit comments

Comments
 (0)