summaryrefslogtreecommitdiffstats
path: root/internal/formatter
diff options
context:
space:
mode:
Diffstat (limited to 'internal/formatter')
-rw-r--r--internal/formatter/telegram.go18
1 files changed, 17 insertions, 1 deletions
diff --git a/internal/formatter/telegram.go b/internal/formatter/telegram.go
index 7491c66..b1b7b7c 100644
--- a/internal/formatter/telegram.go
+++ b/internal/formatter/telegram.go
@@ -2,6 +2,7 @@ package formatter
import (
"fmt"
+ "strings"
"git.db.org.ai/dborg/internal/models"
"git.db.org.ai/dborg/internal/utils"
)
@@ -11,16 +12,31 @@ func FormatTelegramResults(response *models.TelegramPhoneResponse, asJSON bool)
return utils.PrintJSON(response)
}
- PrintSection(fmt.Sprintf("📱 Telegram Phone Lookup"))
+ PrintSection("📱 Telegram Phone Lookup")
fmt.Printf("%s: %s\n", Cyan("Identifier"), response.Identifier)
+ if response.TelegramID != "" {
+ fmt.Printf("%s: %s\n", Cyan("Telegram ID"), response.TelegramID)
+ }
+
if response.PhoneNumber != "" {
fmt.Printf("%s: %s\n", Cyan("Phone Number"), Green(response.PhoneNumber))
} else {
fmt.Printf("%s: %s\n", Cyan("Phone Number"), Red("Not found"))
}
+ if len(response.Contacts) > 0 {
+ fmt.Printf("%s: %s\n", Cyan("Contacts"), strings.Join(response.Contacts, ", "))
+ }
+
+ if len(response.Groups) > 0 {
+ fmt.Printf("%s:\n", Cyan("Groups"))
+ for _, g := range response.Groups {
+ fmt.Printf(" • %s\n", g)
+ }
+ }
+
fmt.Println()
PrintDivider()
fmt.Printf("%s: ", Cyan("Credits Remaining"))