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

Better notifications #14

Open
2 tasks
gpascualg opened this issue Jun 5, 2016 · 11 comments
Open
2 tasks

Better notifications #14

gpascualg opened this issue Jun 5, 2016 · 11 comments

Comments

@gpascualg
Copy link
Member

gpascualg commented Jun 5, 2016

Notifications right now are quite simple, we might improve them by

  • Including the message author in the title
  • Showing theimage of the forum/author
@gpascualg gpascualg added this to the 0.4.0 milestone Jun 5, 2016
@gpascualg
Copy link
Member Author

gpascualg commented Feb 15, 2017

Are notifications working? I don't get them to show, not even the sound. Can someone reproduce?

@gpascualg gpascualg modified the milestones: 0.5.0, 0.4.0 Feb 15, 2017
@gpascualg gpascualg changed the title Mejores notificaciones Better notifications Mar 9, 2017
@jtojnar
Copy link
Contributor

jtojnar commented Apr 16, 2017

@gpascualg We cannot get them to show either.

@Telematica
Copy link

Telematica commented Oct 29, 2017

Notification are silent by default, according the JS code here:

Definition:

forwardMessage(ctrl, message, notify, redraw) {

Implementation:

this.forwardMessage(ctrl, response.data.attributes.messages[i], false, false);

this.forwardMessage(ctrl, args.forward[i], false);

I guess we can delegate enabling notifications to the Extension settings on the Admin dashboard... thoughts on this @gpascualg?

@gpascualg
Copy link
Member Author

@Telematica Indeed, default behaviour is muted. We might have an option on the Admin dashboard to change the defaults, it would be a nice addition.

The problem here, however, is that it seems that whether user-enabled or not, the sound doesn't play. Please bear in mind this code (specially notifications/audio) is screaming "refactor me!"...

@Telematica
Copy link

@gpascualg I'm interested to be involved on the Flarum development, and its community... I'm starting a new project, and I'm using Flarum as an alternative, hope it soon could be released as stable project (at least 1st version). I will not hesitate to perform a pull request on this. ty!

@gpascualg
Copy link
Member Author

Nice @Telematica, any PR would be much appreciated, I'm really busy right now and can't throw much time into this :(

@gpascualg
Copy link
Member Author

gpascualg commented Oct 30, 2017

Ah... I've just reviewed the code and you were absolutely right! Regardless of user settings I am always passing false to notify.

We should modify

forward.push(data);

To trigger notifications with this particular data (as they are new messages)

and

forward.push(response.data.attributes.messages[i]);

To disable them (old missatges fetched at start)

Finally,

this.forwardMessage(ctrl, args.forward[i], false);

would change notify based on those

EDIT: I might have some time to do this! Now that's clear what is failing I can easily solve it

@Telematica
Copy link

@gpascualg I'll be issuing a PR soon to fix notification and do the dashboard notification delegation stuff, so you can review it and merge if you think is OK.

@gpascualg
Copy link
Member Author

@Telematica Any news on the PR?

@Telematica
Copy link

Sorry, not yet, I've been a bit busy. But a new project is coming; in which I'll need to plug this ext to a plain Flarum instance, so I'll got a chance to make refactors and fixes for this. I'll keep you posted.

@gpascualg
Copy link
Member Author

It's okay! Keep an eye to the issue though, if I grasp a bit of time I might fix it myself, in which case I would close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants