# أدوات الإشراف للدردشة؟

**URL:** https://meta.discourse.org/t/moderation-tools-for-chat/279302
**Category:** Feature
**Tags:** chat
**Created:** [17 سبتمبر 2023، 5:19م UTC](https://meta.discourse.org/t/moderation-tools-for-chat/279302 "2023-09-17T17:19:51Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [21 سبتمبر 2023، 8:27م UTC](https://meta.discourse.org/t/moderation-tools-for-chat/279302/9 "2023-09-21T20:27:03Z")

</div>

لدينا اثنان في فئة #Data & reporting يمكن تكييفهما بشكل أكبر:

> [@Most DM channels created (interval)](https://meta.discourse.org/t/most-dm-channels-created-interval/277363):
>
> A list of how many Personal Chats someone has started within the given timeframe. -- [params] -- string :interval = 1 WEEK WITH first\_message AS ( SELECT MIN(cm.id) AS id FROM chat\_messages cm WHERE cm.chat\_channel\_id = ( SELECT DISTINCT id FROM chat\_channels WHERE id = cm.chat\_channel\_id AND created\_at::date \> CURRENT\_DATE - INTERVAL :interval AND chatable\_type = 'DirectMessage' ) GROUP BY cm.chat\_channel\_id ) SELECT cm.user\_id, COUNT(\*) FROM ch…

> [@Most Direct Messages (interval)](https://meta.discourse.org/t/most-direct-messages-interval/277362):
>
> A top ten list of users who have sent the most messages in the given timeframe. -- [params] -- string :interval = 1 WEEK SELECT user\_id, COUNT(\*) FROM chat\_messages WHERE created\_at::date \> CURRENT\_DATE - INTERVAL :interval GROUP BY user\_id ORDER BY COUNT(\*) DESC LIMIT 10

> [@Direct Message Look-Up (interval)](https://meta.discourse.org/t/direct-message-look-up-interval/277364):
>
> A deep dive into all messages sent and received by a user within the given timeframe. -- [params] -- user\_id :user -- string :interval = 1 month SELECT chat\_channel\_id, user\_id, message, created\_at AS reltime$time, created\_at FROM chat\_messages WHERE chat\_channel\_id IN ( SELECT cc.id FROM chat\_channels cc JOIN chat\_messages cm ON cm.chat\_channel\_id = cc.id WHERE cc.chatable\_type = 'DirectMessage' AND cm.user\_id = :user ) AND created\_a…

على الرغم من أننا نأمل في إضافة المزيد من التقارير للدردشة إلى لوحة المعلومات في وقت ما. 👍

---

_[View the full topic](https://meta.discourse.org/t/moderation-tools-for-chat/279302)._
