Skip to Content Skip to Menu

Add new message to Message Centre moderation queue

12 years 1 month ago #211234 by freshwebservices
Add new message to Message Centre moderation queue was created by freshwebservices
Hi,
Is is possible to use the API to add new messages to the Message Center queue?

At the moment I'm using the following code:

$uddeim = new uddeIMAPI();

$result = $uddeim->sendNewMessage( $user_id, $recipient, $msgTxt, 0, 0 );


This adds it to the uddeim table but I also need the message adding to the Message Centre moderation queue. Is this possible?

Any help much appreciated.
Thanks,
Eddie

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
12 years 1 month ago #211235 by slabbi
This is currently not possible with the API.

When you create a new message using the API is it really necessary to moderate the message? Can you give me a scenario where this feature is useful. Maybe I will add this as a new feature to the API.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

12 years 1 month ago #211236 by freshwebservices
Replied by freshwebservices on topic Re: Add new message to Message Centre moderation queue
Hi,
Thanks for the quick response.

Here's the requirement - this is a site for 'vulnerable' users, all messages between registered users (JomSocial) are moderated before delivery (this is covered in the T&Cs). This works well using the Message Centre, etc.

However, when a Guest searches & finds a user, then I want them to be able to message that user while they register, but for the message to be moderated before delivery as above.

I'm using my own plugin to enable this using the function onUserAfterSave().

I suspect mine is a minority use case!

However, I'm willing to use raw sql if there's not a way using the API. I notice that the sendNewMessage() returns the ID of the new message - is there the sql to 'move' this new message into the moderation queue?

Any pointers?

Thanks again,
Eddie

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
12 years 1 month ago #211240 by slabbi
Yes, you can use the ID to set the "moderated" field in #__uddeim to 1. This will place the message in the moderation queue.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

12 years 1 month ago #211245 by freshwebservices
Replied by freshwebservices on topic Re: Add new message to Message Centre moderation queue
Hi,
Thanks but my #__uddeim table doesn't have a field "moderated" ->


I'm running 2.8 stable

Cheers,
Attachments:

Please Log in or Create an account to join the conversation.

12 years 1 month ago #211248 by freshwebservices
Replied by freshwebservices on topic Re: Add new message to Message Centre moderation queue
Is it the 'delalyed' field?

Thanks,
Eddie

Please Log in or Create an account to join the conversation.

Moderators: beatnantslabbikrileon
Powered by Kunena Forum