forked from DrKLO/Telegram
-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
I assume that UnifiedPush implemention was taken from MercuryGram mostly as is, including the use of third-party simple push gateway hosted on https://p2p.belloworld.it/:
TelegramAndroid/TMessagesProj/src/main/java/org/telegram/messenger/UnifiedPushReceiver.java
Lines 27 to 44 in abe07f4
| @Override | |
| public void onNewEndpoint(Context context, String endpoint, String instance){ | |
| Utilities.globalQueue.postRunnable(() -> { | |
| SharedConfig.pushStringGetTimeEnd = SystemClock.elapsedRealtime(); | |
| String savedDistributor = UnifiedPush.getSavedDistributor(context); | |
| if (savedDistributor.equals("io.heckel.ntfy")) { | |
| PushListenerController.sendRegistrationToServer(PushListenerController.PUSH_TYPE_SIMPLE, endpoint); | |
| } else { | |
| try { | |
| PushListenerController.sendRegistrationToServer(PushListenerController.PUSH_TYPE_SIMPLE, "https://p2p.belloworld.it/" + URLEncoder.encode(endpoint, "UTF-8")); | |
| } catch (UnsupportedEncodingException e) { | |
| FileLog.e(e); | |
| } | |
| } | |
| }); | |
| } |
Telegram is supposed to support Web Push directly, without third-party gateway. MercuryGram however claims that Web Push is unreliable. Perhaps that's true, but relying on random third-party gateway server isn't ok either.
prurigro, ZJaume, nidamanx and rugk
Metadata
Metadata
Assignees
Labels
No labels