Merge pull request #2582 from urbit/m/chat-backlog-limit

chat-view: limit initial scrollback to 25 msgs
This commit is contained in:
Fang 2020-03-23 19:14:26 +01:00 committed by GitHub
commit f2986af4b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,6 +109,8 @@
[[%give %fact ~ %json !>(*json)]~ this]
(on-watch:def path)
::
++ message-limit 25
::
++ truncated-inbox-scry
^- inbox
=/ =inbox .^(inbox %gx /=chat-store/(scot %da now.bol)/all/noun)
@ -121,9 +123,9 @@
|= envelopes=(list envelope)
^- (list envelope)
=/ length (lent envelopes)
?: (lth length 100)
?: (lth length message-limit)
envelopes
(swag [(sub length 100) 100] envelopes)
(slag (sub length message-limit) envelopes)
--
::
++ on-agent