GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.
Go botgogolanggolang-whatsappgolang-whatsapp-apirestrest-apiwhatsappwhatsapp-apiwhatsapp-api-gowhatsapp-multi-devicewhatsapp-web-multi-device
feat: set device id as string
Aldino Kemalc0672d93f996
diff --git a/services/user_service_impl.go b/services/user_service_impl.goindex 253add1c..ea38bb81 100644--- a/services/user_service_impl.go+++ b/services/user_service_impl.go@@ -41,7 +41,7 @@ func (service UserServiceImpl) UserInfo(_ *fiber.Ctx, request structs.UserInfoRedevice = append(device, structs.UserInfoResponseDataDevice{User: j.User,Agent: j.Agent,- Device: j.Device,+ Device: utils.GetPlatformName(int(j.Device)),Server: j.Server,AD: j.AD,})diff --git a/structs/send_struct.go b/structs/send_struct.goindex 23298c87..50df8bef 100644--- a/structs/send_struct.go+++ b/structs/send_struct.go@@ -14,7 +14,7 @@ type UserInfoRequest struct {type UserInfoResponseDataDevice struct {User stringAgent uint8- Device uint8+ Device stringServer stringAD bool}diff --git a/utils/whatsapp.go b/utils/whatsapp.goindex 5d4b924f..ce1824f7 100644--- a/utils/whatsapp.go+++ b/utils/whatsapp.go@@ -29,6 +29,35 @@ var (const logLevel = "DEBUG"+func GetPlatformName(deviceID int) string {+ switch deviceID {+ case 2:+ return "UNKNOWN"+ case 3:+ return "CHROME"+ case 4:+ return "FIREFOX"+ case 5:+ return "IE"+ case 6:+ return "OPERA"+ case 7:+ return "SAFARI"+ case 8:+ return "EDGE"+ case 9:+ return "DESKTOP"+ case 10:+ return "IPAD"+ case 11:+ return "ANDROID_TABLET"+ case 12:+ return "OHANA"+ default:+ return "UNKNOWN"+ }+}+func ParseJID(arg string) (types.JID, bool) {if arg[0] == '+' {arg = arg[1:]