1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/packages/moodle-dl/telegram-format.patch

37 lines
1.8 KiB
Diff
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
diff --git a/moodle_dl/notification_services/telegram/telegram_formater.py b/moodle_dl/notification_services/telegram/telegram_formater.py
index 470ff32..9ff1fa4 100644
--- a/moodle_dl/notification_services/telegram/telegram_formater.py
+++ b/moodle_dl/notification_services/telegram/telegram_formater.py
@@ -37,24 +37,24 @@ def create_full_moodle_diff_messages(changed_courses: [Course]) -> [str]:
diff_count += len(course.files)
result_list = []
- one_msg_content = '%s new Changes in the Moodle courses!' % (diff_count)
+ one_msg_content = "%s changes in Moodle!" % (diff_count)
for course in changed_courses:
- new_line = '\r\n\r\n\r\n> **' + course.fullname + '**\r\n'
+ new_line = "\r\n\r\n<b>" + course.fullname + "</b>"
one_msg_content = append_with_limit(new_line, one_msg_content, result_list)
for file in course.files:
if file.modified:
- new_line = '\r\n__* Modified:__ ' + file.saved_to
+ new_line = "\r\n✍ " + file.saved_to
elif file.moved:
if file.new_file is not None:
- new_line = '\r\n__* Moved:__ ' + file.new_file.saved_to
+ new_line = "\r\n📂 " + file.new_file.saved_to
else:
- new_line = '\r\n__* Moved:__ ' + file.saved_to
+ new_line = "\r\n📂 " + file.saved_to
elif file.deleted:
- new_line = '\r\n__- Deleted:__ ' + file.saved_to
+ new_line = "\r\n🗑 " + file.saved_to
else:
- new_line = '\r\n__+ Added:__ ' + file.saved_to
+ new_line = "\r\n🎉 " + file.saved_to
one_msg_content = append_with_limit(new_line, one_msg_content, result_list)