Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple message notifications by having the app background-launched by iOS every few minutes #3

Open
guruz opened this issue Mar 14, 2019 · 6 comments
Labels
enhancement New feature or request ReadyToTest

Comments

@guruz
Copy link
Member

guruz commented Mar 14, 2019

...so that we don't need a push infrastructure

@lowlyw
Copy link
Contributor

lowlyw commented Dec 23, 2019

im not sure that i am a big fan of this. i think the proper way should be by having the quassel-server send a notification via another service. i currently do this via qpush.me or similar. that's also suboptimal, but this sounds battery intense. :\

@guruz
Copy link
Member Author

guruz commented Jan 6, 2020

Note to self: AFAIK iOS launches every 15-20 minutes

@guruz
Copy link
Member Author

guruz commented Jan 6, 2020

From https://quassel-irc.org/node/134

For example, chat activity tracking and highlight rules moved into the core, so clients don't need to pull all the backlog at once

@justjanne Which API is that? Could I from that easily compute e.g. "number of buffers with hilight" + "number of buffers with unread private message" to set the iOS app icon badge number?

@justjanne
Copy link

The BufferSyncer now has two new maps, activity and highlightcount https://github.com/quassel/quassel/blob/master/src/common/buffersyncer.h

Activity stores for each buffer the bitset of activities – so join|part|quit|topic|nickchange|privmsg|notice, etc.

This allows you to figure out if you should show a buffer as green, blue, or nothing in the chat list.

Blue: if the activity has either notice or privmsg flags set

For green, you can either just see if activity is != 0, or you can do it more intelligently.
If you allow users to hide join/part/quits, you just have your bitset of hidden flags (e.g. hide is [join|part]), then you just do activity & ~hide, and you get only the activities which are not hidden. So you just define Green as "activity & ~hide != 0".

For highlights, it’s even more interesting, as it just stores for each buffer the number of unread highlights.

Then there’s the new backlog API: https://github.com/quassel/quassel/blob/master/src/common/backlogmanager.h#L40, where you can use requestBacklogFiltered to only request messages which have certain flags (e.g. highlight) set.

That’s btw how we load notifications for Quasseldroid (pseudocode):

for each buffer:
    if in this buffer all messages notify:
        requestbacklog for this buffer, no filter, maximum 20 messages, only unread
        show them as notification

    if in this buffer highlights notify:
        requestbacklogfiltered for this buffer, only highlights, maximum 20 messages, only unread
        show them as notification

    if in this buffer no messages notify:
        do nothing

@guruz guruz added the enhancement New feature or request label Mar 28, 2020
guruz added a commit that referenced this issue Apr 17, 2020
guruz added a commit that referenced this issue Apr 17, 2020
@guruz
Copy link
Member Author

guruz commented Apr 17, 2020

Simple message notifications by having the app background-launched by iOS every few minutes

This will be in next version :)

guruz added a commit that referenced this issue Apr 18, 2020
guruz added a commit that referenced this issue Apr 18, 2020
guruz added a commit that referenced this issue Apr 18, 2020
guruz added a commit that referenced this issue Apr 18, 2020
guruz added a commit that referenced this issue Apr 18, 2020
@guruz guruz closed this as completed in ed41017 Apr 18, 2020
@guruz guruz reopened this Apr 18, 2020
guruz added a commit that referenced this issue Apr 22, 2020
@Danie10
Copy link

Danie10 commented Jun 4, 2021

I see the Pushover iOS app has integrations for a number of services already, including ZNC Push bouncer. Maybe we could get one there for Quassel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ReadyToTest
Projects
None yet
Development

No branches or pull requests

4 participants