MDL-64167 core_message: get_conversations() excludes self conversations
[moodle.git] / message / classes / api.php
index 776ca92..b4422be 100644 (file)
@@ -759,6 +759,11 @@ class api {
                 continue;
             }
 
+            // Exclude 'self' conversations for now.
+            if (isset($selfconversations[$conversation->id])) {
+                continue;
+            }
+
             $conv = new \stdClass();
             $conv->id = $conversation->id;
             $conv->name = $conversation->conversationname;