fix(vowifi): enable IMS SMS submission on OpenStick 410 (#83)

Co-authored-by: MengMengCode <[email protected]>
This commit is contained in:
Rulio
2026-08-22 15:25:34 +08:00
committed by GitHub
co-authored by MengMengCode
parent 353e93673d
commit cee43ce8d1
5 changed files with 62 additions and 10 deletions
+7 -4
View File
@@ -242,10 +242,6 @@ func (s *Server) handleSMSSend(w http.ResponseWriter, r *http.Request) {
s.writeStoreError(w, err)
return
}
if store.NormalizeDeviceType(config.DeviceType) == store.DeviceTypeWiFi410 {
writeError(w, http.StatusNotImplemented, "device_feature_unsupported", "SMS is not supported by the native OpenStick 410 backend")
return
}
entry, physicalID, present := s.physicalForConfig(config)
if !s.requirePhysicalDevice(w, present) {
return
@@ -291,6 +287,13 @@ func (s *Server) handleSMSSend(w http.ResponseWriter, r *http.Request) {
}
}
}
// Native OpenStick 410 supports SMS only through an established VoWiFi IMS
// session. Keep cellular AT+CMGS disabled until that modem path is separately
// implemented and validated; never silently fall back from IMS to cellular.
if store.NormalizeDeviceType(config.DeviceType) == store.DeviceTypeWiFi410 {
writeError(w, http.StatusConflict, "ims_sms_not_ready", "OpenStick 410 requires a ready VoWiFi IMS SMS session")
return
}
result, sendErr := s.devices.SendSMS(
r.Context(),
physicalID,