1309 Commits

Author SHA1 Message Date
Jun Pataleta
918776482a MDL-63692 message: Set canonicalize to true for array comparison 2018-11-20 14:41:40 +08:00
Andrew Nicols
43f6899289 MDL-63692 message: Correct favourite fetch 2018-11-20 14:40:39 +08:00
Andrew Nicols
ffd303146f MDL-63692 message: Fix unit test assumption
Contact requests do not cause notifications.
2018-11-20 14:40:39 +08:00
Andrew Nicols
b20a6a4af6 Merge branch 'MDL-64024-master' of git://github.com/snake/moodle 2018-11-20 12:26:09 +08:00
Sara Arjona
4f97ea8856 MDL-64024 message: Fix lib::get_messages to get only individual messages
From 3.6 users can have also group conversations, so it's needed to review
the messages_get_messages function to make sure only returns the
individual messages between 2 users.
2018-11-20 10:44:27 +08:00
Andrew Nicols
04e83dcf10 Merge branch 'MDL-64058-master' of https://github.com/snake/moodle 2018-11-20 10:22:41 +08:00
Andrew Nicols
2f7076ebf2 MDL-63692 message: Resolve bad merge conflict 2018-11-20 09:04:53 +08:00
Jake Dallimore
4283291889 MDL-64058 core_message: fix logic driving conversation section expansion
Unread conversations should be given priority over read. If one or more
sections have unread conversations, prioritise favourites over group and
group over individual. The same applies if all conversations are read.
2018-11-20 08:56:37 +08:00
Andrew Nicols
08cd15658a Merge branch 'MDL-63692-master' of git://github.com/sarjona/moodle 2018-11-20 07:51:40 +08:00
Sara Arjona
16913e60b3 MDL-63692 core_message: Add favourite conversations to Privacy API 2018-11-19 22:09:13 +01:00
Sara Arjona
6b036d04cf MDL-63692 core_message: Fix the context for favourite conversations
The converation favourites were previously set in the system context
which is not right, as they should be stored:
- In the conversation context when defined.
- In the user context, when contextid is null (that means is an
individual conversation).
2018-11-19 22:08:28 +01:00
Sara Arjona
201cebeae5 MDL-63692 core_message: Add conversation support to Privacy API 2018-11-19 22:08:22 +01:00
David Monllao
892356acaa MDL-64060 message: Replace error code by language str 2018-11-19 11:18:39 +01:00
David Monllao
a6c4e6f0a6 Merge branch 'MDL-64060-master' of git://github.com/jleyva/moodle 2018-11-19 11:16:09 +01:00
Andrew Nicols
90a4438139 Merge branch 'MDL-64035-master' of https://github.com/snake/moodle 2018-11-19 15:08:22 +08:00
Andrew Nicols
237786f159 Merge branch 'MDL-63913-master' of https://github.com/snake/moodle 2018-11-19 14:59:39 +08:00
Jake Dallimore
da714be155 MDL-64058 core_message: add unread counts to the conversations view 2018-11-19 13:55:18 +08:00
Jake Dallimore
a54115355a MDL-63913 core_message: fix to ensure favourites is exclusive
If a conversation is included in the favourites unread count, it
cannot be included in any other type-based counts.
2018-11-19 13:51:40 +08:00
Jun Pataleta
8699a985bc Merge branch 'MDL-64034-master' of https://github.com/snake/moodle 2018-11-19 12:59:22 +08:00
Jake Dallimore
d2708759d8 MDL-64034 core_message: return conversationid in search_messages() 2018-11-19 10:23:15 +08:00
Jake Dallimore
33022ee1d5 MDL-63913 core_message: add method to get unread conversation counts 2018-11-19 09:48:58 +08:00
Juan Leyva
a28c222e63 MDL-64060 message: Use error string identifier instead full message
The conversationdoesntexist string does not exists but it is better to use an error string catchable by an external client.
2018-11-16 13:20:11 +01:00
Ryan Wyllie
d3d95d5dc2 MDL-63303 message: fix bugs in message drawer part 4
* Add clarification to delete messages lang strings
* Stop message polling when sending a message to fix UI bug
* Publish update last message event when polling finds more messages
* Remove logged in user from group conversation participants list
* Use user object to fetch user preferences to reduce DB calls
* Remove animated slide transitions because the browser breaks when
  showing some conversations
2018-11-16 14:10:10 +08:00
Jake Dallimore
18550c0afb MDL-64035 core_message: get_conversations() excludes disabled chats
Linked conversations which have been disabled must be excluded from
the results.
2018-11-16 12:04:24 +08:00
Eloy Lafuente (stronk7)
9ca803a86d Merge branch 'MDL-63303_master-deleteduserfix' of https://github.com/markn86/moodle 2018-11-15 11:20:36 +01:00
Mark Nelson
52beee65b2 MDL-63303 core_message: dont check online status for deleted users 2018-11-15 18:08:12 +08:00
Eloy Lafuente (stronk7)
7a9717f614 Merge branch 'MDL-63303-master' of git://github.com/ryanwyllie/moodle 2018-11-15 11:04:12 +01:00
Ryan Wyllie
132626720c MDL-63303 message: add member formatting to conversation
Make sure the members are formatted when adding to the state in
a conversation so that any missing data is normalised.
2018-11-15 17:57:44 +08:00
Andrew Nicols
5e47224a62 MDL-63303 message: Stop WS from removing optional keys 2018-11-15 17:56:31 +08:00
Ryan Wyllie
c75559cfff MDL-63303 message: move message drawer to end of <body>
Fix some of the behat tests that are looking for generic button
names that match some of the buttons in the message drawer which
happen to appear earlier in the DOM.
2018-11-15 14:43:22 +08:00
Ryan Wyllie
663ccd58ed MDL-63303 message: fix bugs in message drawer part 3
* Fix bug for newly created conversations being added to overview page
* Fixed bug with use enter to send preference not updating correctly
* Fix unit tests
* Fix race condition loading new messages while conversation resetting
* Fix ordering and rendering of messages with same timestamp
* Fix missing privacy info in get_conversation web service
* Fix linting errors
* Improve bulk message rendering
2018-11-15 14:43:21 +08:00
Ryan Wyllie
a111ab44af MDL-63303 message: fix bugs in message drawer part 2
* Added missing icon mappings for font-awesome
* Fixed focus on dialogue button when it opens
* Fixed UI updates on user block / unblock
* Fix jQuery syntax error when sending message with quotes
* Fix message/index.php opening drawer when no conversation found
* Fix placeholders rendered for new requests
2018-11-15 14:43:21 +08:00
Ryan Wyllie
1d3535f95c MDL-63303 message: fix bugs in message drawer
* Fix navigation from view_contact to view_conversation on an action
  such as blocking
* Fix default open message section on overview page depending on which
  section has conversations
* Fix message/index.php for users who haven't yet started a
  conversation
2018-11-15 14:43:21 +08:00
Ryan Wyllie
8c8939c1ae MDL-63303 message: add enter to send user preference 2018-11-15 14:43:21 +08:00
Ryan Wyllie
f074d6f086 MDL-63303 message: remove behat tests for messaging 2018-11-15 14:43:21 +08:00
Ryan Wyllie
142b042c5c MDL-63303 message: message/index.php open conversation in message drawer 2018-11-15 14:43:21 +08:00
Ryan Wyllie
17d982d751 MDL-63303 message: message/edit.php opens setttings in message drawer 2018-11-15 14:43:21 +08:00
Ryan Wyllie
1e3453b7c7 MDL-63303 message: change nav popover to toggle message drawer 2018-11-15 14:43:21 +08:00
Ryan Wyllie
6f96c06374 MDL-63303 theme_bootstrapbase: add message drawer 2018-11-15 14:43:21 +08:00
Ryan Wyllie
5005d8cfb4 MDL-63303 message: add message drawer (boost only) 2018-11-15 14:43:21 +08:00
Ryan Wyllie
3ea46c8e31 MDL-63303 message: add functions to message_repository.js 2018-11-15 14:40:12 +08:00
Ryan Wyllie
0802c38a2f MDL-63303 message: add lastmessagedate to messagearea contact 2018-11-15 14:40:12 +08:00
Ryan Wyllie
ecb4755c91 MDL-63303 message: add count_contacts api function 2018-11-15 14:40:12 +08:00
Ryan Wyllie
b3bbd4a0e1 MDL-63303 message: fix get_conversations external func 2018-11-15 14:40:12 +08:00
Ryan Wyllie
569c0bae9c MDL-63303 message: add get_conversation_between_users external func 2018-11-15 14:40:12 +08:00
Ryan Wyllie
4e3130269c MDL-63303 message: add get_conversation to message api 2018-11-15 14:40:12 +08:00
Ryan Wyllie
6399c7ef14 MDL-63303 message: add count_conversations to api 2018-11-15 14:40:12 +08:00
Ryan Wyllie
886b01783b MDL-63303 message: add fields to send_instant_message 2018-11-15 14:40:12 +08:00
Ryan Wyllie
0866b33635 MDL-63303 message: add fields to contact requests 2018-11-15 14:40:12 +08:00
Ryan Wyllie
8350978aa1 MDL-63303 message: add get_member_info external function 2018-11-15 14:40:12 +08:00