From b6871901051f73c110e4b446f5f5c4bea70dc2cf Mon Sep 17 00:00:00 2001
From: Paul Makles <paulmakles@gmail.com>
Date: Sat, 27 Jun 2020 09:16:54 +0100
Subject: [PATCH] Don't send inactive DMs to user.

---
 src/routes/user.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/routes/user.rs b/src/routes/user.rs
index fcf237e..36b7a12 100644
--- a/src/routes/user.rs
+++ b/src/routes/user.rs
@@ -91,7 +91,8 @@ pub fn dms(user: UserRef) -> Response {
         doc! {
             "$or": [
                 {
-                    "type": channel::ChannelType::DM as i32
+                    "type": channel::ChannelType::DM as i32,
+                    "active": 1
                 },
                 {
                     "type": channel::ChannelType::GROUPDM as i32
-- 
GitLab