Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Messaging source codeMessaging source code
Previous
 
Next
New Post
7/31/2013 8:08 AM
 

Hello there, 

I am writing a module and need to have a good grasp of messaging in DNN. I tried to find it i the source code but it is huge and kind of baffling. 

I am pretty much interested to find where DNN checks if somebody has a new message in the inbox, and the modules that handles sending messages and replays.

I looked to the wiki for API's, although it is a good start it literally tells you nothing. 

I would appreciate if you can tell me where to find these in DNN source code.  

1- check if user have a new message .

2- create a replay to that message.

Thanks in advance !

 
New Post
7/31/2013 9:39 AM
 
it can be a little confusing as there has always been some email support in DNN, and there was a messaging module added around 6.0, so there are a lot of "messaging" named classes. However in 6.2.0 we added the messaging/notification centre and wanted it to be quick and responsive, so we re-architected it to be a single page application (SPA). As such, all the relevant messaging calls are contained within a service framework class (Community\Modules\CoreMessaging\Services\MessagingServiceController.cs) and are called via Community\Modules\CoreMessaging\Scripts\CoreMessaging.js methods. This would be the way I would recommend you use them (note: these call into the InternalMessagingController class, which has a concrete implementation in InternalMessagingControllerImpl -in theory you can use these, but the use of "internal" denotes that we do not regard them as public API so there is a risk they could change in a future release)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/1/2013 6:09 AM
 

I would suggest that you look at creating your own set of wrapper classes if you are considering directly accessing the internal messaging methods - that way if and when they do change its easier to remap your wrapper methods in most cases.

But IMHO - given the import that is being placed on social/notifications/messaging - and the fact that its all bound up and wired thru the core - it seems like maybe there DO need to be external facing APIs that can be accessed by 3rd party modules in the future.

Westa

 
New Post
8/1/2013 9:31 AM
 

Thank you guys for your answers, 

I started from   "MessagingServiceController" and got to the interface "IInternalMessagingController"   (in DotNetNuke.Services.Social.Messaging.Internal) . I guess it works for me to use methods like InternalMessagingController.Instance.CountUnreadMessages() 

About the concerns of future changes, I am  making a chat box like Facebook (I am making it for a specific need of a customer but with some changes it could be used by public), I can upload it at Codeplex and when DNN changed I can change this module accordingly.

I could not find and documentations or comment in the source codes for these methods though, so I wonder what is a "Conversation" and what is a "Thread" ,what happens when you  "MarkMessageAsDispatched" and now can I get a list of new messages, I can count them but I cant get them as a list ?

 

 

Thank you very much again 

 

ps: it seems it has a very advanced architecture though, I earned how to use it for now but I would like to learn about it do you know where I can get quick information about that ?

 

 
New Post
8/1/2013 1:26 PM
 
AFAIR threads and conversations are the same thing - they're there to support the case where a user is talking to multiple people e.g. when 1 user posts to a group (that say contains 1000 people), rather than create a message for each of these, we create one entry and note that it goes to many people. This is tracked via the conversationID, so a reply to the message can go to all the users (and again only creates one entry, and not a thousand). As for MarkMessageAsDispatched, - when a message that is to be emailed (such as a notification or system email) is created, MarkMessageAsDispatched is set to false. There is an email scheduled task which checks periodically and when it finds a new message, checks who it's sent to and dispatches the messages (so in the case I've described sends 1000 messages) - this entry is then set to MarkMessageAsDispatched=true by the scheduled task. Note: when you do not want to send email out to the users (such as a message sent via the messaging system) but want the messages created you set MarkMessageAsDispatched=true when creating the message.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Messaging source codeMessaging source code


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out