janimo / textsecure-qml

TextSecure UI in Go and QML
GNU General Public License v3.0
44 stars 5 forks source link

Implement notifications #12

Open janimo opened 9 years ago

janimo commented 9 years ago

This will need a server component as well and likely collaboration with OWS on server infrastructure setup.

K14D commented 9 years ago

https://developer.ubuntu.com/en/start/platform/guides/push-notifications-client-guide/

janimo commented 9 years ago

Thanks, the client side is implemented already. I need to work on the server and when I have working code try to get it accepted by OpenWhisperSystems.

janimo commented 8 years ago

Ubuntu push server does not seem to work well with Java clients.
https://bugs.launchpad.net/ubuntu-push/+bug/1522810

PRs for upstream TextSecure server component

https://github.com/WhisperSystems/TextSecure-Server/pull/62 https://github.com/WhisperSystems/PushServer/pull/4

K14D commented 8 years ago

Moxie unfortunately rejected the PRs. Is there any plan b?

janimo commented 8 years ago

Nothing I am afraid. If the Ubuntu Touch push system implemented (not sure if it is doable at all) GCM compatibility maybe. Or if lightweight background tasks were allowed that would keep a websocket open. But both these would require more work for very little gain - the number of Signal users (even including all potential ones) is very small.

ghost commented 8 years ago

Hi janimo, I tried to politely ask the openwhisper developers about the state of affairs regarding your both commits. I don't know what to think about Moxie's response, but I must say, I am shocked how he refused it, without giving any reason and also by locking the conversation to collaborators (so I could not ask why he refused it). It would be really interesting to know why the commits were refused.

K14D commented 8 years ago

It would be just a crutch, but wouldn't it be possible to build a kind of proxy server, which fetches messages from the textsecure server via websocket and pushes them via UPS? Because of the users credentials each user should run his own proxy, but basically this could be a way to make textsecure on ubuntu really usable!?

bonanza123 commented 8 years ago

Is there any change to use parts of the websocket stuff that has been done for https://github.com/LibreSignal/LibreSignal ?

ghost commented 8 years ago

Hi Janimo,

thanks again for the great Textsecure Client for Ubuntu Touch. I frequently use and enjoy it. I would like to ask you whether you have any news or ideas for the issue of notifications?

Thanks, Pete

janimo commented 8 years ago

Hi, nothing has changed since last time.

On Sun, Aug 14, 2016, 1:58 PM Pete413 notifications@github.com wrote:

Hi Janimo,

thanks again for the great Textsecure Client for Ubuntu Touch. I frequently use and enjoy it. I would like to ask you whether you have any news or ideas for the issue of notifications?

Thanks, Pete

— You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHub https://github.com/janimo/textsecure-qml/issues/12#issuecomment-239667540, or mute the thread https://github.com/notifications/unsubscribe-auth/AADD2tGRXuVEdVaLDm3RUH4uJuysqdxbks5qfvTLgaJpZM4F8Ye4 .

StuntsPT commented 8 years ago

Would implementing this proposal potentially solve the issue? https://docs.google.com/document/d/1o-y3dUOm8voAzhZCpbPSg-zhRBweYHXn8voQDprZtsc/edit#heading=h.mkp949ntqaq5 Thanks.

janimo commented 8 years ago

Thanks for the link. I haven't studied it besides a cursory look, but if/when this is implemented it may be a workaround for the lack of server support for notifications.

ghost commented 8 years ago

Hi janimo, it seems that the notification support on Ubuntu Touch platform has already improved: "a new telephony-service for a fix for the no-SMS-notifications bug" (https://lists.launchpad.net/ubuntu-phone/msg22596.html) Is this what could help notifications for your TextSecure App?

janimo commented 8 years ago

The notification support we'd need is the ability to run a background task (either standalone or as a plugin that is part of a system-wide background task ) that could poll the Signal servers and notify the locally running push notification subsystem to have it pop up a notification.

The current client notification support on the phone relies on an external server pushing events, which lacking Signal server side support does not suffice for us.

ssweeny commented 8 years ago

@janimo have you thought about including a background task and uploading to the Open Store just to make it more useful to people?

janimo commented 8 years ago

Hey Scott :) I haven't been following Ubuntu Touch development for a while. Are background tasks supported now? I am all for making this useful for more people. What is the Open Store, a new name for the Ubuntu App store?

ssweeny commented 8 years ago

Hey :-)

The Open Store is an alternative app store for Ubuntu where you can upload apps that won't work with the current confinement scheme. There is a tradeoff there in that some of the apps are actually unconfined or don't meet the standards for the normal Ubuntu store.

There is at least one other IM service (Loqui) on the Open Store, and I use it for XMPP along with some settings from UT Tweak Tool that lets you prevent an app from suspending. It's not perfect but it will do until the proper messaging framework is released.

janimo commented 8 years ago

Thanks, so is a background task a new feature or just any process you want to run when unconfined as on a regular Ubuntu? Ideally there would be something that can be dropped in to replace the missing push notification server side without too many other changes.

StuntsPT commented 8 years ago

I'm not 100% sure, but AFAIK in the open store you can create a "daemon" that runs in the background and is started when the system boots. This daemon that would come "bundled" with TextSecure in the open store would check for notifications at a regular interval (or implement the push notifications from android) and "wakes up" the main TextSecure app when a new notification arrives. From what I have read, this is something that can be done, but please correct me if I'm wrong. Here are three examples of apps from the open store that somehow have something running in the background: Loki IM Dekko Rockworks

I'm sure that Dekko from the open store has an implementation for working around the notification-plugin limitations, so you may wish to look there first. I'm not sure how either of the other two work...

sethdc commented 8 years ago

Let's see if we can get someone with OpenStore experience to jump in. Mike Sheldon, @Elleo , wrote the awesome CuteSpotify app and released it to the OpenStore. I know he's still active with the community even if he isn't active with other projects.

Mike, can you jump in and provide some insight for @janimo. Jani has done a tremendous amount of work getting TextSecure/Signal functionality on Ubuntu Touch. Many of us would love to see his work become a core app. Right now, we're just trying to figure out how he can deliver notifications to the phone and possibly use the OpenStore. I've utilized the "Prevent App Suspension" option that "UT Tweak Tools" from the OpenStore provides, but I think @janimo will need to implement an additional polling feature of some sort.

So again, Mike, is there any way that you could help expedite Jani's efforts. You've been down the path of the OpenStore before, and your experience would probably save him some headache.

Elleo commented 8 years ago

Hey @janimo, it looks like you've been doing some great stuff here :) I think the best place to get some advice on this would be the Open Store telegram group, the developers of both Rockwork and the Loqui IM port are members and can probably give some good guidance on exactly this sort of thing: https://telegram.me/joinchat/BMTh8AHtOL2foXLulmqDxw

janimo commented 8 years ago

@sethdc you mention wanting to see this as a core app (it was my hope to when I started working on it). Are there APIs available to core apps that would make the background work easier?

sethdc commented 8 years ago

This discussion has been ongoing for almost a year, and it has me equally optimistic and perplexed. I'm optimistic because I see enduring passion for the project itself and from the community in regard to free speech and encryption. I'm perplexed as to what step we should take next to move forward together.

The last thing the community needs is another forked messenger app that is only used by few. To me, this is why @janimo's efforts are so important to Signal's ongoing successes and to the security of the Ubuntu community as a whole. Make no mistake, if @moxie0 were to accept Jani's PR, Signal would have native support not just for thousands of Ubuntu Phone users, but Moxie would be unlocking native support for the over TWENTY MILLION people that use Ubuntu desktop EVERY DAY.

We currently have this support with Telegram on our Ubuntu desktops and phones. Thanks, but we want Signal.

Two days ago, Moxie made two very important points:

  1. Federation degrades the Signal user experience
  2. He is open to "clean, well written, and well tested" PRs

To his first point, I agree. I would gladly spend several thousand dollars every year hosting a federated server that allowed all Ubuntu users to point to and reliably use Signal based upon Jani's work and Moxie's libsignal-protocol/service. However, that is not the optimal solution. Fragmentation and federation only dilute the Signal experience, product, and service.

To his second point, if Moxie is open to using clean, well-written, and well-tested code for websocket-only support, then be open to using clean, well-written, and well-tested code for 20,000,000 Ubuntu desktop users.

Moxie states that he would be fine with accepting the PR if the service comes with a warning that the websocket-only support is limited and not a reflection of the overall Signal service/experience. I agree. Jani's code and applications should come with a warning that absolves OWS and Moxie of any liability or complaints. However, we are the willing testers and adopters of this important work that is being done. There will always be complainers and whiners, but We The Willing must all continue to strive together for the benefit of the unwilling and the indifferent.

I'm sure Moxie is overwhelmed and exhausted with people that complain but never do the work, but here we are saying that Jani has done that work and the rest of us are here willing to do the work of ongoing trial and ongoing testing. We know that there will be setbacks and problems along the way, but only by working together will we succeed.

We need dialogue and direction from OWS on how to move forward together. We have the same goals. We have the same motivation. Patience, perseverance, cooperation, and communication will bring about the change we all desire.

StuntsPT commented 8 years ago

@sethdc After reading your post I have opened this issue. Maybe @moxie0 will let us know what would be required to have this considered.

kallekruse commented 7 years ago

WebSocket support has been added to Signal: https://github.com/WhisperSystems/Signal-Android/commit/1669731329bcc32c84e33035a67a2fc22444c24b

sethdc commented 7 years ago

So is this the part where we remind Jani how awesome he is, and then ask him to implement it for the good of all mankind??? :)

On Fri, Apr 14, 2017 at 10:16 AM, kallekruse notifications@github.com wrote:

WebSocket support has been added to Signal: WhisperSystems/Signal-Android@ 1669731 https://github.com/WhisperSystems/Signal-Android/commit/1669731329bcc32c84e33035a67a2fc22444c24b

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/janimo/textsecure-qml/issues/12#issuecomment-294160961, or mute the thread https://github.com/notifications/unsubscribe-auth/ANpFfsk4zhwHfVkTAsuVYzbIISmwO7aqks5rv3-8gaJpZM4F8Ye4 .

janimo commented 7 years ago

Thanks, however I am not sure websocket support is enough. We'd need background task processing capabilities in the Ubuntu Phone no? I didn't give much thought to this project in the past year, and with the recent news re Unity, I am not sure the future of the phone is any brighter than it was (and it wasn't that bright to begin with)

sethdc commented 7 years ago

I'll see if I can figure out the procedure for publishing to the OpenStore to get around the background process situation, and then type up some notes.

On Fri, Apr 14, 2017 at 11:06 AM, Jani Monoses notifications@github.com wrote:

Thanks, however I am not sure websocket support is enough. We'd need background task processing capabilities in the Ubuntu Phone no? I didn't give much thought to this project in the past year, and with the recent news re Unity, I am not sure the future of the phone is any brighter than it was (and it wasn't that bright to begin with)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/janimo/textsecure-qml/issues/12#issuecomment-294169996, or mute the thread https://github.com/notifications/unsubscribe-auth/ANpFfsTLN3UwuitlAhP43l-jrp_tUPZ1ks5rv4tkgaJpZM4F8Ye4 .

janimo commented 7 years ago

Thanks, but I'd rather work with officially accepted APIs only (patches welcome though for OpenStore compatibility).

kallekruse commented 7 years ago

There might be hope - https://forums.ubports.com/topic/273/june-1-2017-app-developer-os-developer-meeting says:

Notifications

Lots of discussion. [A] Arrived at calling an app in the background to do its work. Ubuntu will call apps with a certain argument to put them into background mode. The app must finish its work in under x seconds and use under x CPU, or be blacklisted Provide options to the user to deny this permission to some apps or (maybe) change how much battery an app is allowed to take.