mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 16:26:30 +01:00
I guess we should probably limit channel history messages returned. TODO: Move this to a server config directive.
This commit is contained in:
parent
c7f32f904d
commit
5d75db95ed
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue