mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-20 15:08:34 +03:00
chat-hook: send right amount of backlog
This commit is contained in:
parent
b1eed3a0e0
commit
c5ccc1171a
@ -690,13 +690,14 @@
|
|||||||
=/ length (lent envs)
|
=/ length (lent envs)
|
||||||
=/ latest
|
=/ latest
|
||||||
?~ backlog-latest length
|
?~ backlog-latest length
|
||||||
?: (gth u.backlog-latest length) length
|
?: (gth u.backlog-latest length) 0
|
||||||
(sub length u.backlog-latest)
|
(sub length u.backlog-latest)
|
||||||
=. envs (scag latest envs)
|
=. envs (scag latest envs)
|
||||||
=/ =vase !>([%messages pas 0 latest envs])
|
=/ =vase !>([%messages pas 0 latest envs])
|
||||||
%- zing
|
%- zing
|
||||||
:~ [%give %fact ~ %chat-update !>([%create pas])]~
|
:~ [%give %fact ~ %chat-update !>([%create pas])]~
|
||||||
?. ?&(?=(^ backlog-latest) (~(has by allow-history) pas)) ~
|
?. ?&(?=(^ backlog-latest) (~(has by allow-history) pas)) ~
|
||||||
|
?: =(0 latest) ~
|
||||||
[%give %fact ~ %chat-update vase]~
|
[%give %fact ~ %chat-update vase]~
|
||||||
[%give %kick [%backlog pax]~ `src.bol]~
|
[%give %kick [%backlog pax]~ `src.bol]~
|
||||||
==
|
==
|
||||||
|
Loading…
Reference in New Issue
Block a user