summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/sj_tele.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sj_tele.py b/indoteknik_custom/models/sj_tele.py
index 5ea08340..3ef4b877 100644
--- a/indoteknik_custom/models/sj_tele.py
+++ b/indoteknik_custom/models/sj_tele.py
@@ -66,10 +66,12 @@ class SjTele(models.Model):
header = "Berikut merupakan nomor BU/OUT yang belum ada di Logbook SJ report:\n"
BUB = 20 # jumlah baris per bubble
+ total = (len(lines) + BUB - 1) // BUB # total bubble
for i in range(0, len(lines), BUB):
body = "\n".join(lines[i:i + BUB])
- text = header + body
+ bagian = (i // BUB) + 1
+ text = f"{header}Lampiran ke {bagian}/{total}\n{body}"
try:
r = requests.post(
api_base + "/sendMessage",