This looks easy enough, thank you @yariplus!
Best posts made by orweinberger
Latest posts made by orweinberger
User context in plugin button
I'm working on a plugin that adds a button for each post, in the post-tools section. I'm trying to figure out how I can get the user and post context in my plugin code when this button is clicked, but not sure where to start.
Do you know of a plugin with similar functionality that I can review and see how it was done?
RE: How to use Write API to chat with user in a chat room
Thanks @yariplus, I also found this very useful.
I'm trying to fire a hook whenever a new chat message is sent. I noticed there's a hook called
action:chat.sent. My plugin however does not get that hook fired even when a new chat message is sent for some reason.
I also noticed there's
filter:parse.rawbut these fire with all chat data, meaning that if I sent one message but in my history I have more messages, the hook will fire with all previous messages as well, and I would only like it to fire once when a new chat is sent. As a workaround I guess I can bind to
filter:messaging.parseand manually filter out anything that isn't
isNew: false, but I am looking for something cleaner if possible.
NodeBB chat bot plugin
Hi, I'm trying to build a chatbot for my nodebb forum, at the moment I'm using the
action:post.savehook and then run a check to see if the bot's username was mentioned. This is not ideal because only a fraction of the posts will contain the bot mention. Is there a hook specifically for a mention that I can use?
Getting the user id of a username via plugin
I'm currently working on an example plugin and I would like to basically know the userid of a given mentioned username.
So for example, if a user comments and says 'Hey @someusername how are you?' I would like to find out the userid of 'someusername' via my plugin.
I can't seem to find any relevant method under
Userthat will allow me to get this info.
This is quite an old request, ChangeTip now has a nodejs module to perform API actions:
If anyone can assist with this, it would be very much appreciated.
I would love to know if anyone has any idea on a different plugin that I could use as a skeleton to create this plugin. I tried using the nodebb-plugin-sso skeleton but it seems to be a bit obsolete.
SSO Plugin questions
I'm working with this SSO plugin skeleton: https://github.com/julianlam/nodebb-plugin-sso-oauth to create my own.
I want to add a check to see if the user who is trying to connect to this 3rd party is already logged in to NodeBB, if so I would like to disregard the email address provided by the 3rd party sso and just add the other fields from the sso provider to his profile.
The reason for this is becuase whenever a user is already logged in and tries to connect via SSO and that he is registered in that 3rd party with a different email address, NodeBB will create a new user.
I can see that I need to add a check under the
OAuth.loginfunction but not sure how to check if there's currently a logged in session for this user.