Check if ackId is nil first (#3046)
This commit is contained in:
parent
4ee4ff10dd
commit
f25ffdf3d5
1 changed files with 8 additions and 8 deletions
|
|
@ -125,14 +125,14 @@ import os.log
|
|||
}
|
||||
|
||||
public func notificationReceipt(notificationId: Any?, receivedAt: Int, type: Any?) {
|
||||
let store = StoreManager.shared() as StoreManager
|
||||
let entities = store.getEntities(true)
|
||||
if (entities != nil) {
|
||||
let serverURL = store.getServerUrl()
|
||||
let sessionToken = store.getToken()
|
||||
let urlString = "\(serverURL!)/api/v4/notifications/ack"
|
||||
|
||||
if (notificationId != nil) {
|
||||
if (notificationId != nil) {
|
||||
let store = StoreManager.shared() as StoreManager
|
||||
let entities = store.getEntities(true)
|
||||
if (entities != nil) {
|
||||
let serverURL = store.getServerUrl()
|
||||
let sessionToken = store.getToken()
|
||||
let urlString = "\(serverURL!)/api/v4/notifications/ack"
|
||||
|
||||
let jsonObject: [String: Any] = [
|
||||
"id": notificationId as Any,
|
||||
"received_at": receivedAt,
|
||||
|
|
|
|||
Loading…
Reference in a new issue