summaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
authorsinner <[email protected]>2026-06-08 21:24:09 +0000
committersinner <[email protected]>2026-06-08 21:24:09 +0000
commit2875e578f5e22ae0971d057819f1ab4362b4d115 (patch)
tree7b1021e00f6c23d131a74567201ed213fe62aa43 /internal
parent742d340eaa8bd93f6814a1dd375a22152f4404ad (diff)
downloaddborg-2875e578f5e22ae0971d057819f1ab4362b4d115.tar.gz
dborg-2875e578f5e22ae0971d057819f1ab4362b4d115.zip
fix: npd sort_by shorthand conflict with root -o flagHEADv1.1.3master
Diffstat (limited to 'internal')
-rw-r--r--internal/formatter/telegram.go18
-rw-r--r--internal/models/telegram.go7
2 files changed, 22 insertions, 3 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"))
diff --git a/internal/models/telegram.go b/internal/models/telegram.go
index 05900cb..8afbdcd 100644
--- a/internal/models/telegram.go
+++ b/internal/models/telegram.go
@@ -1,8 +1,11 @@
package models
type TelegramPhoneResponse struct {
- Identifier string `json:"identifier"`
- PhoneNumber string `json:"phone_number"`
+ Identifier string `json:"identifier"`
+ TelegramID string `json:"telegram_id,omitempty"`
+ PhoneNumber string `json:"phone_number,omitempty"`
+ Contacts []string `json:"contacts,omitempty"`
+ Groups []string `json:"groups,omitempty"`
Credits struct {
Remaining int `json:"remaining"`
Unlimited bool `json:"unlimited"`