Commit Graph

184 Commits

Author SHA1 Message Date
dcadc8c54c MDL-65968 notifications: Use f1 size avatars for Push notifications 2019-09-17 16:29:02 +02:00
47138d9157 MDL-66244 message: Include group sender images in payload
Android 9 notifications now displays two image icons in conversations.
The group and the sender.
2019-08-28 10:33:59 +01:00
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
06d046c1ff MDL-65093 core_message: deprecate can_post_message() 2019-07-29 10:39:57 +08:00
e867ffd689 Merge branch 'MDL-65344_master' of git://github.com/markn86/moodle 2019-06-05 21:06:15 +02:00
7918a0ea4c MDL-65566 core_message: let get_self_conversation use lazy init too 2019-05-15 18:46:41 +08:00
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
18e5f9bef8 MDL-65566 core_message: create the self-conversation when needed
Instead of creating all the self-conversations during the upgrading,
some code has been added to the get_conversations and to the
get_conversation_counts to create it whe it doesn't exist.
2019-05-15 18:42:46 +08:00
a0523b826e MDL-65313 core_favourites: component scoped deletion now requires itemid
This now requires itemid, which cannot be null. This is safer. The
context can still be passed in as an optional parameter.
2019-05-07 16:26:46 +08:00
2daa199351 Merge branch 'MDL-65132-master' of git://github.com/cescobedo/moodle 2019-05-07 16:24:40 +08:00
d47e067184 MDL-65132 core_message: Added API to delete message for all users 2019-05-06 09:38:54 +02:00
6421775ad2 MDL-65313 core_message: remove favourites when deleting a conversation
When deleting a conversation for all users (e.g. when deleting a group
which has a conversation), we need to remove any favourites.
2019-05-06 14:01:34 +08:00
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
57532ad680 MDL-65344 core_message: deprecate get_individual_conversations_between_users() 2019-04-30 10:35:55 +08:00
b63c0b9079 Merge branch 'MDL-60680-master' of git://github.com/jleyva/moodle 2019-04-25 18:55:45 +02:00
2356454f21 MDL-60680 notifications: Include action buttons information 2019-04-25 14:55:57 +02:00
36fa0ec900 MDL-60680 notifications: Return custom data in notifications 2019-04-25 14:55:18 +02:00
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
2767426111 MDL-64715 message: avoid duplicate entries when searching messages 2019-04-15 14:29:10 +02:00
3a5afbf5f1 MDL-65015 core_message: add trusttext cleaning to messaging 2019-04-07 10:56:53 +02:00
978f233b8b MDL-64568 core_message: added new method to nuke conversations entirely
This method removes all data in the database related to a
given conversation.
2019-03-13 15:41:53 +08:00
00c5924546 MDL-64773 core_message: ensure existing APIs return muted status 2019-03-13 08:55:13 +08:00
2687312b29 MDL-64773 core_message: added API to mute/unmute conversations 2019-03-13 08:55:13 +08:00
3d122bd284 Merge branch 'MDL-63915_master' of git://github.com/markn86/moodle 2019-02-27 12:08:09 +08:00
7ece4ca9da MDL-63915 core_message: mark items that can be removed in MDL-63261 2019-02-27 11:35:36 +08:00
89bab5e8f0 MDL-64931 core_message: fixed PHP error when users are deleted from DB 2019-02-25 07:48:44 +08:00
bfaebeb754 Merge branch 'MDL-64791-master' of git://github.com/jleyva/moodle 2019-02-19 17:42:21 +01:00
289b79992b MDL-64791 messages: Bring back 'messagecontactrequests' message 2019-02-07 12:06:41 +01:00
fc2664501b MDL-64632 core_message: fixed PHP error when users are deleted from DB 2019-02-04 12:36:22 +08:00
f7ff96c24f Merge branch 'MDL-64412-master' of https://github.com/snake/moodle 2019-01-22 23:46:45 +01:00
c7f9834e29 MDL-64426 core_message: fix context::instance_by_id() wrong use 2019-01-08 23:01:52 +01:00
e66e867f6e MDL-64426 core_message: fix filter support in api::get_conversations()
Conversation name and subname should support filters, so the data should
be passed through format_string, and advertised in the external params
as PARAM_TEXT.
2019-01-08 15:50:43 +08:00
a3a6e3c905 MDL-64412 core_message: remove ordering code from message_search_users()
This code is no longer needed as get_member_info() now respects the
ordering of the $userids param.
2019-01-02 15:21:07 +08:00
442f142522 MDL-64038 core_message: add default group image
add default group image to improve the alignment
of group names in the message drawer group messages section
2018-12-14 14:09:28 +01:00
f8b46dabe8 MDL-64003 core_message: Use sql_like_escape() in message_search_users 2018-12-11 11:52:18 +01:00
7c8ba89d5e MDL-64307 core_message: do not include disabled conversations in count 2018-12-04 11:48:16 +08:00
b1e01063a8 Merge branch 'MDL-64224-master' of https://github.com/snake/moodle 2018-11-28 12:02:34 +08:00
e412548506 MDL-64224 core_message: fix for isfavourite in api::get_conversation() 2018-11-28 09:09:07 +08:00
1add1cd644 Merge branch 'MDL-64047-master' of https://github.com/snake/moodle 2018-11-27 11:51:48 +08:00
e492a5540d MDL-64047 core_message: contact request count must exclude blocked users 2018-11-27 08:46:25 +08:00
7f6f45c460 MDL-64167 core_message: fix counts to exclude 'self' conversations 2018-11-26 08:52:55 +08:00
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
cb38961988 MDL-64167 core_message: get_conversations() handles self conversations
Those individual conversations created with one's self (via admin user
bulk actions) are now supported in get_conversations(). These had two
records with the same userid in the message_conversation_members table.
The following adjustments have been made to accomodate these:
- Member count adjusted to read 1, not 2 for 'self' conversations.
- Member information for the current user now returned for 'self'
conversations.
- The method now tracks 'self' conversations via $selfconversations.
2018-11-26 08:52:54 +08:00
beb7083381 Merge branch 'MDL-64057-master' of https://github.com/snake/moodle 2018-11-23 14:47:00 +08:00
c296c48f66 MDL-64057 core_message: fix bug with favourite count aggregation 2018-11-23 14:42:33 +08:00
35889e23b7 Merge branch 'MDL-64180_master' of git://github.com/markn86/moodle 2018-11-23 12:21:13 +08:00
720cc99331 MDL-64180 core_message: change stdClass to int for count requests param
This will be used by a new web service and we do not want to fetch
the user unnecessarily in the call.

Also renamed the method for consistency.
2018-11-23 11:34:40 +08:00
252f0e16ea Merge branch 'MDL-64057-master' of https://github.com/snake/moodle 2018-11-23 11:24:58 +08:00
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
8e91aaabc9 MDL-64057 core_message: consolidate conversation counts into single call
Counts for types (individual, group) and favourites can be fetched with
a single API call.
2018-11-23 11:02:19 +08:00