Quick Messages Plugin


(Angus McLeod) #129

Hey guys, I suppressed messages from the system user, i.e. the user that is automatically created when an instance is created. This is the user that is the ‘author’ of all automatic messages, e.g. the welcome message, telling an admin when a backup was completed etc.

This was to prevent the issue @tobiaseigen mentioned, i.e. it is not desired to have system messages appear in the quick-message list.

I had assumed that people leave this user as the system user and don’t use it personally, but it seems this is not the case.

I’m not sure whether it will be possible to separate ‘automatic’ as opposed to ‘manual’ messages from this user. I’ll have a look.


(Marcos P) #130

Nice, thanks for help, i change the user and working fine now.


(Angus McLeod) #131

@marcospreviato

Thanks guys. When the text is English (i.e. ‘New Message’) it appears on the same line, so I hadn’t noticed this before.

I’ve updated the CSS


(Will Battel) #132

Is there a way to pull these messages to display on another service (same user base)? Or maybe some sort of API for developers to retrieve and inject messages from other services? I use Discourse as a forum for our gaming community, and I’m writing a game plugin for messaging, and it’d be super cool if messages could by synched between the game server and Discourse.


#133

@angus I am the admin and I cannot get any messages to show when I click the Quick Messages icon - it just says No Messages Yet. Other admins and users have normal functionality. When I send them messages, they show up in their dropdown, but nothing shows up in mine. I am registered with the developer email and am the main admin. Ill try rebuilding tonight and report back if anything changes. Thanks!


(Angus McLeod) #134

Hey, this plugin displays normal Discourse private messages in a different way. You can get Discourse private messages through the Discourse api.

Here’s a useful topic explaining the api (including how to get private messages):


(Angus McLeod) #135

Hey, yes that is expected. Please see this post where I explained what is going on if you are using the default admin for your own personal account. I will see if I can do something about this soon.


(Will Battel) #136

Awesome, I’ll take a look. Thanks.

Also, if this plugin just changes the look of the built in system, does this mean I can use the plugin and just get the messages from the discourse API? Or can I not use the plugin?


(Angus McLeod) #137

Yup, all the messages you see in this plugin are available via the Discourse api.


(Pad Pors) #138

2 questions Angus:

  1. i just noted that user with trust level 0 and 1 also see the letter-icon and can push the new message button there, but then they can’t send it. these users can’t use the plugin because of the trust-limits, is it possible not to show them the new-message-btn? or perhaps some better ways to avoid their useless trials?

  2. the error message after a trial of TL0 user is an empty message in my case, i’m using Persian language, but even when i changed the local language to English it’s still empty (the main language of the discourse is still Persian). do you have any idea why is that so? or how i can fix this?

##update:
just understood that this error is not only for TL0, i had the same problem messaging with admin to a new user.

after i continue another message from before, the plugin works. no error log!

any idea?

  • when i was continuing the message from before, after each time i entered some text and pressed enter, the mouse goes to the first message in the flow! and i had problem scrolling down. let me know if i could explain what i wanted! :wink:

(Angus McLeod) #139

Hey, yes these are issues with trust level limits and rate limiting. As you know, Discourse has some fine-grained features for who can post and when. This plugin doesn’t handle that so finely at the moment so you will see this kind of issue pop up every now and then. I’ve been busy with other stuff, but I do plan to come back to this soon (this week) to better handle trust levels and rate limiting. Sorry for the inconvenience.


(Angus McLeod) #140

I’ve just updated this plugin:

  1. I added a quick message create rate limit setting, which defaults at 1 second.

  2. I added a quick message min character length, which also defaults to 1 character.

  3. I removed the uniqueness check on quick messages (i.e. identical posts can be posted after each other).

  4. I removed the maximum number of first day replies for quick messages.

The upshot of all this is that quick messages much more closely resemble chat. Watch this for an example: http://quick.as/b1wbsoq7ac. And that the kind of issues mentioned by @Pad_Pors above should no longer occur.

A couple of caveats:

  1. Please note that due to the reason mentioned below in ‘Technical’, currently these settings will affect all private messages, i.e. it will also change the rate and character limits on private message topics. I hope to restrict them to quick messages only (as opposed to all private messages) soon.

  2. These settings I changed for quick messages were originally put in place by the Discourse team for a reason. Partly to prevent spam. Partly to encourage civilized discussion. I am open to feedback on these limits and how they should be re-set for this context.

Technical

@zogstrip @tgxworld Guys, correct me if I’m wrong, but it seems it’s not possible to pass Post custom_fields when actually creating a post, as custom_fields is not a permitted parameter in the create_params method in the posts_controller?

However it also seems as if though the post_creator anticipates that this is actually possible, see here.

It is possible to add the custom_fields immediately after the post is created. This is what Topic Ratings does.

However I think Quick Messages need to pass the fields when the post is created to handle rate limiting without interfering with other private messages, i.e. see here and here.

Any advice would be appreciated. Thanks.


(Pad Pors) #141

thanks Angus for the update.

I haven’t tested the new update yet, meanwhile another issue reported by one of our members is something like this image:

that is: you have messages, and you don’t see them unless you go to “show more”.


(Angus McLeod) #142

Hey, messages are restricted to non-admin messages now. Is this a new user? The ‘welcome’ message will not show up here.

The notification badge/count may need to be updated though…


(Pad Pors) #143

thanks.

no, this is not a new user. but the message is a message from admin.

so does this mean whenever an admin/moderator messages someone, the notification is shown, but the message can not be open via the plugin?


(Angus McLeod) #144

What should happen is that messages for the admin show up in the user’s notification stream in the user menu and that the notification for the message shows up as a user notification.

This made sense to me as the ‘admin’ message is then appearing alongside other notifications ‘from the app’, rather than alongside the conversations you’re having with other users.

I’m confident that the admin messages are showing up in the user’s notification stream in the user menu, however there may be issues with the notification for it.


#145

I recently updated Discourse + Quick Message Plugin and its kind of broken now…

…this reloading state lasts forever.

Any hints what to do?


(James Kiesel) #146

Probably this:


#147

I updated discourse again to latest, problem remains…


(cpradio) #148

It would. As latest has the ES6 changes and Quick Messages hasn’t had an opportunity to update to accomodate those changes yet.