Add new chat types and use less for displaying rooms.txt

- Added type 4: inaktiv/gelöscht
- Added type 5: inaktiv
- Added type 6: Notiz an mich
- All CASE statements updated in SQL queries
- Changed cat to less -F for displaying rooms.txt

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
wralto-user-1
2026-10-31 15:19:58 +01:00
parent 071dc04f62
commit a463d29638

View File

@ -104,6 +104,9 @@ list_all_rooms() {
WHEN 1 THEN 'Gruppe' WHEN 1 THEN 'Gruppe'
WHEN 2 THEN 'öffentlich' WHEN 2 THEN 'öffentlich'
WHEN 3 THEN 'privat' WHEN 3 THEN 'privat'
WHEN 4 THEN 'inaktiv/gelöscht'
WHEN 5 THEN 'inaktiv'
WHEN 6 THEN 'Notiz an mich'
WHEN 7 THEN 'föderiert' WHEN 7 THEN 'föderiert'
ELSE CONCAT('Unbekannt (', type, ')') ELSE CONCAT('Unbekannt (', type, ')')
END AS Typ, END AS Typ,
@ -132,6 +135,9 @@ list_all_rooms() {
WHEN 1 THEN 'Gruppe' WHEN 1 THEN 'Gruppe'
WHEN 2 THEN 'öffentlich' WHEN 2 THEN 'öffentlich'
WHEN 3 THEN 'privat' WHEN 3 THEN 'privat'
WHEN 4 THEN 'inaktiv/gelöscht'
WHEN 5 THEN 'inaktiv'
WHEN 6 THEN 'Notiz an mich'
WHEN 7 THEN 'föderiert' WHEN 7 THEN 'föderiert'
ELSE CONCAT('Unbekannt (', type, ')') ELSE CONCAT('Unbekannt (', type, ')')
END AS Typ, END AS Typ,
@ -158,7 +164,7 @@ list_all_rooms() {
echo -e "${GREEN}=================================================================${NC}" echo -e "${GREEN}=================================================================${NC}"
echo "" echo ""
cat "$output_file" less -F "$output_file"
echo "" echo ""
echo -e "${GREEN}Die Liste wurde in $output_file gespeichert.${NC}" echo -e "${GREEN}Die Liste wurde in $output_file gespeichert.${NC}"
@ -437,10 +443,10 @@ show_rooms_file() {
fi fi
echo -e "\n${GREEN}=================================================================${NC}" echo -e "\n${GREEN}=================================================================${NC}"
echo -e "${GREEN} Inhalt von $file${NC}" echo -e "${GREEN} Inhalt von $file (mit less - zum Beenden: q)${NC}"
echo -e "${GREEN}=================================================================${NC}" echo -e "${GREEN}=================================================================${NC}"
echo "" echo ""
cat "$file" less -F "$file"
echo "" echo ""
read -p "Enter..." read -p "Enter..."
} }
@ -464,6 +470,9 @@ list_rooms_with_participants() {
WHEN 1 THEN 'Gruppe' WHEN 1 THEN 'Gruppe'
WHEN 2 THEN 'öffentlich' WHEN 2 THEN 'öffentlich'
WHEN 3 THEN 'privat' WHEN 3 THEN 'privat'
WHEN 4 THEN 'inaktiv/gelöscht'
WHEN 5 THEN 'inaktiv'
WHEN 6 THEN 'Notiz an mich'
WHEN 7 THEN 'föderiert' WHEN 7 THEN 'föderiert'
ELSE CONCAT('Unbekannt (', r.type, ')') ELSE CONCAT('Unbekannt (', r.type, ')')
END AS Typ, END AS Typ,
@ -487,6 +496,9 @@ list_rooms_with_participants() {
WHEN 1 THEN 'Gruppe' WHEN 1 THEN 'Gruppe'
WHEN 2 THEN 'öffentlich' WHEN 2 THEN 'öffentlich'
WHEN 3 THEN 'privat' WHEN 3 THEN 'privat'
WHEN 4 THEN 'inaktiv/gelöscht'
WHEN 5 THEN 'inaktiv'
WHEN 6 THEN 'Notiz an mich'
WHEN 7 THEN 'föderiert' WHEN 7 THEN 'föderiert'
ELSE CONCAT('Unbekannt (', r.type, ')') ELSE CONCAT('Unbekannt (', r.type, ')')
END AS Typ, END AS Typ,
@ -510,6 +522,9 @@ list_rooms_with_participants() {
WHEN 1 THEN 'Gruppe' WHEN 1 THEN 'Gruppe'
WHEN 2 THEN 'öffentlich' WHEN 2 THEN 'öffentlich'
WHEN 3 THEN 'privat' WHEN 3 THEN 'privat'
WHEN 4 THEN 'inaktiv/gelöscht'
WHEN 5 THEN 'inaktiv'
WHEN 6 THEN 'Notiz an mich'
WHEN 7 THEN 'föderiert' WHEN 7 THEN 'föderiert'
ELSE CONCAT('Unbekannt (', r.type, ')') ELSE CONCAT('Unbekannt (', r.type, ')')
END AS Typ, END AS Typ,
@ -540,7 +555,7 @@ list_rooms_with_participants() {
echo -e "${GREEN}=================================================================${NC}" echo -e "${GREEN}=================================================================${NC}"
echo "" echo ""
cat "$output_file" less -F "$output_file"
echo "" echo ""
echo -e "${GREEN}Die Liste wurde in $output_file gespeichert.${NC}" echo -e "${GREEN}Die Liste wurde in $output_file gespeichert.${NC}"