From 5d75db95ed8a615d1e6fd9d511f2aac937071108 Mon Sep 17 00:00:00 2001 From: Greg Taylor Date: Fri, 25 May 2007 13:15:59 +0000 Subject: [PATCH] I guess we should probably limit channel history messages returned. TODO: Move this to a server config directive. --- functions_comsys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions_comsys.py b/functions_comsys.py index 5d13024346..905b532875 100644 --- a/functions_comsys.py +++ b/functions_comsys.py @@ -166,7 +166,7 @@ def msg_chan_hist(session, channel_name): channel_name: (str) The channel's full name. """ cobj = get_cobj_from_name(channel_name) - hist_list = CommChannelMessage.objects.filter(channel=cobj).order_by('date_sent') + hist_list = CommChannelMessage.objects.filter(channel=cobj).order_by('date_sent')[0:20] for entry in hist_list: delta_days = datetime.datetime.now() - entry.date_sent days_elapsed = delta_days.days