Commit Graph

26 Commits

Author SHA1 Message Date
Mark Nelson 78348dfc4e MDL-61255 core_message: added helper function to detect legacy messages 2018-04-10 17:28:52 +08:00
Mark Nelson e159b53b5b MDL-36941 core_message: improved performance of helper::get_messages()
Improved the query to use the 'convhash' field as well as adding an index.

Also fixed issue where 'timeread' was hardcoded as 0.
2018-03-23 12:30:30 +08:00
Mark Nelson b2cd17e6a9 MDL-36941 core: added 'convhash' field to quickly get conversations 2018-03-23 12:30:28 +08:00
Mark Nelson 883ce42127 MDL-36941 core: convert existing api to use new table structure
Also deprecated the following functions -

1. message_move_userfrom_unread2read - It is not necessary
   for us to mark a message as read on user deletion.
2. message_get_blocked_users - Horrible logic used to
   determine if a user is blocked via reference on some
   randomly chosen 'isblocked' variable.
3. message_get_contacts - The same as above. This can be
   done in a much nicer way.
4. message_mark_message_read - We want two functions to do
   this to avoid confusing messages and notifications.
5. message_can_delete_message - This assumed the variable
   $message contained the 'useridto' property, which
   was present in the old table structure. We do not want
   future usages where a query is done on the new table
   and is simply passed as this won't contain this property.
6. message_delete_message - Same as above.
2018-03-23 12:30:27 +08:00
Mark Nelson cb8057531f MDL-56871 core_message: fix inconsistent online status between panels 2016-11-23 16:32:46 +08:00
Mark Nelson ffd7798c96 MDL-56139 core: changes after peer review
- No longer use the Fibonacci sequence for delaying the timeout.
  It is too aggressive.
- The backoff_timer AMD module now expects the callback AND the
  backoff function to be passed to the constructor.
- Added ability to specify polling frequency in config.php.
- Added helper function to return the cache key.
- Reworded the parameters for clarity.
2016-11-16 10:22:52 +08:00
Ryan Wyllie fb1469d84f MDL-56139 message: ajax poll for new messages in message area 2016-11-16 10:22:33 +08:00
Andrew Nicols ebc746dcc2 MDL-56090 message: Make key in union unique
This also fixes the unit test to use the correct indices.
2016-10-26 15:43:56 +08:00
David Monllao 055cc7d037 Merge branch 'MDL-56252-master' of git://github.com/ryanwyllie/moodle 2016-10-24 10:25:32 +08:00
Mark Nelson 1f64514def MDL-56090 core_message: added API unit tests 2016-10-21 16:22:03 +08:00
Ryan Wyllie 54d83992b4 MDL-56252 message: clean message text in message area
Remove the HTML tags from any message in the message area when updating
the last message on the contact otherwise the styling breaks and also
allows <script> tags to be added to the page.
2016-10-20 06:49:26 +00:00
Mark Nelson de55cb1b53 MDL-56089 core_message: modified API so it is not tied to renderables
Also did some minor refactoring/tidying of the code.
2016-10-07 16:37:56 +08:00
Mark Nelson 7b55aaa12e MDL-55942 core: obey the mighty CiBoT 2016-10-07 16:26:40 +08:00
Mark Nelson 79f6c36c12 MDL-55942 core_message: moved added functionality from message/lib.php 2016-10-07 16:26:40 +08:00
Mark Nelson 89a70ba1a5 MDL-55623 core_message: indicate who the message is from 2016-10-07 16:26:40 +08:00
Mark Nelson 5bf0ff278a MDL-55811 core_message: ensure contact always shown 2016-10-07 16:26:40 +08:00
Mark Nelson dd0c1403a1 MDL-55637 core_message: display icon for blocked users 2016-10-07 16:26:40 +08:00
Ryan Wyllie c33b7d8913 MDL-54701 message: add unread message count to messages 2016-10-07 16:26:40 +08:00
Mark Nelson bf58081d59 MDL-54687 core_message: return online status for messages and profile 2016-10-07 16:26:40 +08:00
Mark Nelson cd03b8d7f2 MDL-54687 core_message: added search functionality 2016-10-07 16:26:40 +08:00
Mark Nelson 1e5f751ffc MDL-54687 core_message: moved renderables to 'messagearea' namespace 2016-10-07 16:26:40 +08:00
Mark Nelson 8ec78c48fa MDL-54687 core_message: added ajax scrolling for messages 2016-10-07 16:26:40 +08:00
Ryan Wyllie eda6bc19e6 MDL-54701 message: added isread to data_for_messagearea_conversations 2016-10-07 16:26:40 +08:00
Mark Nelson dec0cd9998 MDL-54687 core_message: added ability to delete conversations 2016-10-07 16:20:51 +08:00
Mark Nelson 3090f52f9d MDL-54687 core_message: added ability to delete messages 2016-10-07 16:20:51 +08:00
Mark Nelson 879e2bef23 MDL-54687 core_message: created page for new messaging interface
This commit introduces the templates, renderer and initial API
that will be used for further development.
2016-10-07 16:20:51 +08:00