[PATCH damus v1] Update push notification device token address

1 view
Skip to first unread message

Daniel D’Aquino

unread,
Jul 1, 2024, 10:16:04 PM (4 days ago) Jul 1
to pat...@damus.io, Daniel D’Aquino
This commit sets up the correct server address to send device tokens to.

Testing
-------

PASS

Device: iPhone 13 Mini
iOS: 17.5
Damus: This commit
strfry-push-notify: 6c52129ab52f37f6686b1a3d1d0d8b478de9e60f
Setup:
- strfry-push-notify and notification device token server setup on the real damus server
- APNS environment setup to development on the server (temporarily)
- Developer settings turned on
- Experimental push notifications support turned ON
- "Send device tokens to localhost" setting turned OFF
- Notification mode in notification settings set to PUSH notifications
Steps:
1. Get a simulator up and running and connected to the Damus relay
2. Send a DM to the main device under test.
3. Check if push notification arrives even with Damus closed. PASS

Closes: https://github.com/damus-io/damus/issues/1733
Signed-off-by: Daniel D’Aquino <dan...@daquino.me>
---
damus/Util/Constants.swift | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/damus/Util/Constants.swift b/damus/Util/Constants.swift
index a72ed0c3..f3cbf43a 100644
--- a/damus/Util/Constants.swift
+++ b/damus/Util/Constants.swift
@@ -10,9 +10,9 @@ import Foundation
class Constants {
//static let EXAMPLE_DEMOS: DamusState = .empty
static let DAMUS_APP_GROUP_IDENTIFIER: String = "group.com.damus"
- static let DEVICE_TOKEN_RECEIVER_PRODUCTION_URL: URL = URL(string: "https://notify.damus.io:8000/user-info")!
+ static let DEVICE_TOKEN_RECEIVER_PRODUCTION_URL: URL = URL(string: "http://45.33.32.5:8000/user-info")!
static let DEVICE_TOKEN_RECEIVER_TEST_URL: URL = URL(string: "http://localhost:8000/user-info")!
- static let DEVICE_TOKEN_REVOKER_PRODUCTION_URL: URL = URL(string: "https://notify.damus.io:8000/user-info/remove")!
+ static let DEVICE_TOKEN_REVOKER_PRODUCTION_URL: URL = URL(string: "http://45.33.32.5:8000/user-info/remove")!
static let DEVICE_TOKEN_REVOKER_TEST_URL: URL = URL(string: "http://localhost:8000/user-info/remove")!
static let MAIN_APP_BUNDLE_IDENTIFIER: String = "com.jb55.damus2"
static let NOTIFICATION_EXTENSION_BUNDLE_IDENTIFIER: String = "com.jb55.damus2.DamusNotificationService"

base-commit: b349de22b7ba84d7678347cd807adb8222439094
--
2.44.0


William Casarin

unread,
Jul 1, 2024, 10:24:49 PM (4 days ago) Jul 1
to Daniel D’Aquino, pat...@damus.io
On Tue, Jul 02, 2024 at 02:15:57AM +0000, Daniel D’Aquino wrote:
>This commit sets up the correct server address to send device tokens to.

lgtm!

Reviewed-by: William Casarin <jb...@jb55.com>

Daniel D'Aquino

unread,
Jul 3, 2024, 2:18:42 PM (2 days ago) Jul 3
to William Casarin, sembene_truestar via patches
Thanks! Pushed to 0be0273121b8d2351905e4a84fe1fc763ca4e941


Reply all
Reply to author
Forward
0 new messages