Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShihabM committed Nov 13, 2019
1 parent 08dbb15 commit a2fe55c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Binary file modified Assets/Icon.sketch
Binary file not shown.
Binary file not shown.
5 changes: 4 additions & 1 deletion Mast/Mast/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
request.addValue("application/json", forHTTPHeaderField: "Accept")
let task = session.dataTask(with: request as URLRequest, completionHandler: { data, response, error in
guard error == nil else {


let subscription2 = PushNotificationSubscription(endpoint: URL(string:"https://pushrelay1.your.org/relay-to/production/\(token)")!, alerts: PushNotificationAlerts.init(favourite: UserDefaults.standard.object(forKey: "pnlikes") as? Bool ?? true, follow: UserDefaults.standard.object(forKey: "pnfollows") as? Bool ?? true, mention: UserDefaults.standard.object(forKey: "pnmentions") as? Bool ?? true, reblog: UserDefaults.standard.object(forKey: "pnboosts") as? Bool ?? true))
state = PushNotificationState(receiver: receiver, subscription: subscription2, deviceToken: deviceToken)
PushNotificationReceiver.setState(state: state)
let requestParams2 = PushNotificationSubscriptionRequest(endpoint: "https://pushrelay-mast1.your.org/relay-to/production/\(token)", receiver: receiver, alerts: PushNotificationAlerts.init(favourite: UserDefaults.standard.object(forKey: "pnlikes") as? Bool ?? true, follow: UserDefaults.standard.object(forKey: "pnfollows") as? Bool ?? true, mention: UserDefaults.standard.object(forKey: "pnmentions") as? Bool ?? true, reblog: UserDefaults.standard.object(forKey: "pnboosts") as? Bool ?? true))
let url2 = URL(string: "https://\(GlobalStruct.currentInstance.returnedText)/api/v1/push/subscription")!
let session2 = URLSession.shared
Expand Down

0 comments on commit a2fe55c

Please sign in to comment.