-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add messaging system #52
Comments
Use the Message moduleWe will use the Message as this uses a fieldable entity and can be associated with users for user to user communication and with Assets for conflict resolution. Step one: Setup basic messaging
Step two will be for asset Messaging around conflict resolution. |
and create a test module to create user messages.
I have create a custom module that adds a create message form to the user form that allows the logged in user to send a message to the selected user. I have also created a messages type that includes a message title, message body and message recipient. To view the messges I have created 2 views. The "My Messages" show the messages sent to the selected user and the "User Messages" view shows all user messages sent. The new custom module, the message module and the message nofity module have been commited on a new 52 branch. I have exported the "My Messages" view https://www.dropbox.com/s/d9hkwk18l66wta8/my_messages_view.txt?dl=0, "User Messages" view https://www.dropbox.com/s/kcyqudmjams2s8m/user_message_view.txt?dl=0 and the "User Message" type https://www.dropbox.com/s/kcyqudmjams2s8m/user_message_view.txt?dl=0. |
Just interested why and how we are using dropbox as part of our development process? Maybe Skype Friday morning? Cheers! |
Unfortunately Github doesn't allow us attach files and @BBGuy wanted views and message type exported for easy deployment . We're using Dropbox to host the exported views and message types as test files so they can be attached to this issue. |
Coolio! |
I have just added a new view that will add a table of messages for the currently logged in user. This has a block and can be used on the notifications page. I have exported the view to https://www.dropbox.com/s/6r6pmwjyp7twhc5/message_notifcations_view.txt?dl=0. |
I have added email notification of user messages using the Message_notify module. After checking the code and testing I have changes the email address the message is sent ot to be the recipients email address. The email address is obtained by loading the recipient user and getting thier email address. |
The Message Subscribe module requires the Flag module to be installed. It is designed to send notification messages users that events have occured on the site. It uses the flag module to flag a users interest in node. The Message Subscribe UI module provides some standards views. It requires some flags to be configured before the views can be used. |
Deployment to Dev
|
Great work @andystiller below are the requirements we went over plus the next stage
Needs finishing
Next stage
Notes:
|
@andystiller you code has now been pushed to live so can be setup
|
@andystiller one other small issue I came across
|
Deployment to Live
|
The email title and body needed to be configured for the message in the message display settings. |
Further work on the email system
|
The message sender (the users full name) can be included in the Message Title using Tokens provided by the Message Module. This allows the sender to beincluded inthe email subject line while leaving the sender of the message as the site email address. The other advantage is that the name also appears in the User Messages administration view. |
The message body needs to be configured display as plain text to in the Manage Display (Notify - Email body). If the Message body is dispalyed with default formatting characters can get escaped (HTML codes). |
Some users don't have a full name configured so for now I will make the code and the configuration use the username instead of the Full name. |
System MessagesTo create system messages the most flexible and easiest to congiure way would be to clode the "User Message" type and change the email /title settings so that email notifications would have the correct format. This has the other advantage of making the filtering of messages easier. It would also allow better Rules integration.
|
To create the System Message it is best clone the "User Message" rather than import a new Message type as cloning creates all the fields. The Description and Mesage text should be edited after cloning. The Account Approved and assigned Asset Author messages have been created in Rules. I have also updated the User Message administration view to include a System Message administration view. |
Deploy to dev
Deploy to live
|
The subject field of emails sent doesn't have a space between the message text and the message title.
|
The notification view has been updated to include system messages and the minor formatting problems have been worked around. There is a new issue #57 to handle the remaining minor formatting problems. |
Not sure about doing this. Please use the real name? If there isn't a real name then we'll need to look at our options. Usernames should never be used for display other than the URL (I think). On 8 Jan 2015, at 14:14, andystiller notifications@github.com wrote:
|
@andystiller Can you make sure the real name is required, this will make sure all new users got one. |
I have tested on my local copy and the Full Name field is required when registering a user either through the create new account screen or the /admin/people page. |
I have tested on my local copy and the Full Name field is required when registering a user either through the create new account screen or the /admin/people page. I have updated the dev and live sites to make sure all users have a full name defined. |
After a lot of thought and a discussion with @BBGuy I think that there should be change to messaging system. The current system has the owner of the message as the sender and a message recipient as a separate field. This makes sense for user messages but not for the system and entity message types. The changes will allow for extra states of the message (eg. read, hidden) that can be changed by the recipient of the message. If we make the owner of the message the recipient and only have an extra sender field for the user message that would make more sense and allow for the notification view to show all message types to the user. Work required
Use casesUser messagesSingle recipient Multiple recipients System MessageA system message would be sent from the site to a single recipient. The exact formatting of the message body would depend on the systems message being sent. Entity MessageClaim request |
the Entity Reference Prepopulate module.
I have updated the code, views and rules to follow the changes outlined in the last comment. I have also created and tested a new message type called an Entity Message. This type of message can be sent when an entity (e.g. an Asset or Claim Request) is created or changed. The Entity Message has an Entity reference field to Node. |
Deploy to dev
Deploy to live
|
The main work on the messaging system is now complete. The following issues continue the work on the messaging system and extend the functionality:
|
We need to add a messaging system that can perform the following
The text was updated successfully, but these errors were encountered: