121 Commits

Author SHA1 Message Date
Paul Holden
df2544ee7b MDL-56389 message: allow marking notifications as read up to given time. 2020-01-23 22:16:30 +00:00
Mark Nelson
90403c5d9d MDL-65093 core_message: users can't block any user they want
If blocking will have no effect (ie. you are attempting to block
the admin) the 'Block' button will not be shown and instead a
message will be shown explaining why you can not block the user.
2019-07-29 10:39:57 +08:00
Jake Dallimore
510ede5698 MDL-65566 core_message: fix bug allowing duplicate unique conversations
Individual and self conversations may exist once only, so we need to
enforce this in the creation method.
2019-05-15 18:46:39 +08:00
Mark Nelson
2904a7f851 MDL-65365 core_message: prevent users from viewing all conversations 2019-05-08 17:54:44 +02:00
Amaia Anabitarte
e4987f0f58 MDL-64993 core_message: fix unit test for non-ordered queries 2019-05-07 17:54:43 +02:00
Andrew Nicols
2daa199351 Merge branch 'MDL-65132-master' of git://github.com/cescobedo/moodle 2019-05-07 16:24:40 +08:00
cescobedo
e3e1938789 MDL-65132 core_message: Added WS to delete message for all users
Also, added WS new return parameter candeletemessagesforallusers in get_conversation
and send_instant_message and added API support. This will be used to check
if the user can delete all messages in the conversation.
2019-05-06 09:39:34 +02:00
Amaia Anabitarte
888a467a78 MDL-64993 core_message: Adding self-conversations to unit tests 2019-05-06 00:47:52 +02:00
Jake Dallimore
3edac09063 MDL-65169 core_message: user search respects profile visibility
Two modes of visibility checking are supported, depending on the value
of the 'messagingallusers' site setting (site-wide messaging):
- If site-wide messaging is enabled, a user may only be returned in
search results if the searching user can view their profile somewhere
(either the site profile or any course profile).
- If site-wide messaging is disabled, a user may only be returned in
search results if the searching user shares a course with them and can
view their course profile in the shared course.
2019-04-30 11:25:46 +08:00
David Monllaó
b63c0b9079 Merge branch 'MDL-60680-master' of git://github.com/jleyva/moodle 2019-04-25 18:55:45 +02:00
Juan Leyva
333d11c9fc MDL-60680 notifications: New customdata field
New field to store custom data for message processors.
2019-04-23 13:15:24 +02:00
Sara Arjona
734b198fd3 MDL-64715 message: add support for self conversations
Added new MESSAGE_CONVERSATION_TYPE_SELF type for self-conversations
and upgraded legacy self-conversations to the new type, removing
repeated members in the message_conversation_members table.
Besides, from now, a self-conversation will be created by default for
all the existing users.

All the self-conversations have been also starred and a default message
will be displayed always to explain how to use them.
2019-04-15 20:17:54 +02:00
Mark Nelson
00c5924546 MDL-64773 core_message: ensure existing APIs return muted status 2019-03-13 08:55:13 +08:00
Mark Nelson
086409f601 MDL-64773 core_message: added web services to mute/unmute conversations 2019-03-13 08:55:13 +08:00
Mark Nelson
89bab5e8f0 MDL-64931 core_message: fixed PHP error when users are deleted from DB 2019-02-25 07:48:44 +08:00
Mark Nelson
fc2664501b MDL-64632 core_message: fixed PHP error when users are deleted from DB 2019-02-04 12:36:22 +08:00
Andrew Nicols
b1e01063a8 Merge branch 'MDL-64224-master' of https://github.com/snake/moodle 2018-11-28 12:02:34 +08:00
Jake Dallimore
e412548506 MDL-64224 core_message: fix for isfavourite in api::get_conversation() 2018-11-28 09:09:07 +08:00
Andrew Nicols
1add1cd644 Merge branch 'MDL-64047-master' of https://github.com/snake/moodle 2018-11-27 11:51:48 +08:00
Jake Dallimore
e4088b7582 MDL-64047 core_message: test get_contact_requests() with blocked users 2018-11-27 08:55:35 +08:00
Jake Dallimore
e492a5540d MDL-64047 core_message: contact request count must exclude blocked users 2018-11-27 08:46:25 +08:00
Jake Dallimore
b402a163e3 MDL-64140 core_message: add get_unread_conversation_counts() web service 2018-11-26 10:54:18 +08:00
Jake Dallimore
7f6f45c460 MDL-64167 core_message: fix counts to exclude 'self' conversations 2018-11-26 08:52:55 +08:00
Jake Dallimore
425f5adcca MDL-64167 core_message: get_conversations() excludes self conversations
The UI can't handle these, so for now, let's not return them.
2018-11-26 08:52:55 +08:00
Damyon Wiese
35889e23b7 Merge branch 'MDL-64180_master' of git://github.com/markn86/moodle 2018-11-23 12:21:13 +08:00
Mark Nelson
7d678923b3 MDL-64180 core_message: added new WS for contact request count 2018-11-23 11:34:55 +08:00
Jun Pataleta
252f0e16ea Merge branch 'MDL-64057-master' of https://github.com/snake/moodle 2018-11-23 11:24:58 +08:00
Jake Dallimore
0847aa120c MDL-64057 core_message: return conversations with soft-deleted users
Individual conversations with a soft-deleted user (including messages)
are now displayed in the conversation listing. This brings the behaviour
of individual conversations in line with group conversations, in that
the active user can still view messages.
2018-11-23 11:02:20 +08:00
Jake Dallimore
28ff6ad1da MDL-64057 core_message: add get_conversation_counts() web service 2018-11-23 11:02:20 +08:00
Mark Nelson
c9b0f33f78 MDL-64018 core_message: added external::get_user_contacts
This is to replace usages of external::data_for_messagearea_contacts
in the new UI.
2018-11-21 11:09:55 +08:00
Andrew Nicols
90a4438139 Merge branch 'MDL-64035-master' of https://github.com/snake/moodle 2018-11-19 15:08: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
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
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
4e3130269c MDL-63303 message: add get_conversation to message api 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
Jake Dallimore
41485be2c8 MDL-63974 core_message: fix logic for non-contacts in user search
This should depend on the messagingallusers setting and, if false,
should only return those users having a profile the searcher can see.
If true, then any user can be returned. There is no requirement to
have a conversation with the user.
2018-11-15 09:59:39 +08:00
Damyon Wiese
eac24f2b71 Merge branch 'MDL-63945_master' of git://github.com/markn86/moodle 2018-11-12 16:36:57 +08:00
Mark Nelson
d15c1e77b0 MDL-63945 core_message: fixed discrepancy between helpers 2018-11-12 15:30:30 +08:00
Damyon Wiese
b0f45a8b8f Merge branch 'MDL-63724-master-3' of https://github.com/snake/moodle 2018-11-12 14:16:31 +08:00
Damyon Wiese
75e6661940 Merge branch 'MDL-63909_master' of git://github.com/markn86/moodle 2018-11-12 14:01:01 +08:00
Jake Dallimore
2553e9db8e MDL-63724 core_message: add send_messages_to_conversation() web service 2018-11-12 10:09:27 +08:00
Damyon Wiese
080cc5b671 Merge branch 'MDL-63864_master' of git://github.com/markn86/moodle 2018-11-12 10:02:25 +08:00
Mark Nelson
b3ce575e63 MDL-63864 core_message: added unit tests 2018-11-09 13:28:39 +08:00
Mark Nelson
daa33803cd MDL-63864 core_message: get_contact_requests now uses helper 2018-11-09 12:12:17 +08:00
Mark Nelson
4461288dfa MDL-63909 core_message: undeprecated still used functions by old UI
A note has been made to remove these and other functions once we
remove the old UI.
2018-11-08 18:43:17 +08:00
Mark Nelson
cef1d977c3 MDL-63850 core_message: get_conversations returns privacy and requests 2018-11-08 16:24:29 +08:00
Mark Nelson
5c675c5076 MDL-63850 core_message: '$referenceuserid' used when returning requests 2018-11-08 16:05:25 +08:00
Amaia Anabitarte
548cac7dbf MDL-63282 core_message: New Search API function 2018-11-08 13:11:28 +08:00
Eloy Lafuente (stronk7)
3c577cb583 Merge branch 'MDL-63883-master' of https://github.com/snake/moodle 2018-11-07 10:48:12 +01:00