Send and receive SMS messages using your Android phone programmatically via a simple HTTP API
Add message thread update code
Acho Arnold87753075111f
diff --git a/api/pkg/listeners/message_thread_listener.go b/api/pkg/listeners/message_thread_listener.goindex 80c4b52b..f796fba0 100644--- a/api/pkg/listeners/message_thread_listener.go+++ b/api/pkg/listeners/message_thread_listener.go@@ -59,7 +59,7 @@ func (listener *MessageThreadListener) OnMessageAPISent(ctx context.Context, eveOwner: payload.Owner,Contact: payload.Contact,UserID: payload.UserID,- Status: entities.MessageStatusSent,+ Status: entities.MessageStatusPending,Timestamp: payload.RequestReceivedAt,Content: payload.Content,MessageID: payload.MessageID,diff --git a/api/pkg/services/message_thread_service.go b/api/pkg/services/message_thread_service.goindex cf223a62..1bdd1c35 100644--- a/api/pkg/services/message_thread_service.go+++ b/api/pkg/services/message_thread_service.go@@ -62,7 +62,7 @@ func (service *MessageThreadService) UpdateThread(ctx context.Context, params Mereturn service.tracer.WrapErrorSpan(span, stacktrace.Propagate(err, msg))}- if thread.OrderTimestamp.Unix() > params.Timestamp.Unix() {+ if thread.OrderTimestamp.Unix() > params.Timestamp.Unix() && thread.Status != entities.MessageStatusFailed {ctxLogger.Info(fmt.Sprintf("thread [%s] has timestamp [%s] which is greater than timestamp [%s] for message [%s]", thread.ID, thread.OrderTimestamp, params.Timestamp, params.MessageID))return nil}diff --git a/web/components/MessageThread.vue b/web/components/MessageThread.vueindex 07e8ad4d..c53da0e7 100644--- a/web/components/MessageThread.vue+++ b/web/components/MessageThread.vue@@ -89,19 +89,34 @@<v-list-item-action-text>{{ threadDate(thread.order_timestamp) }}</v-list-item-action-text>- <v-icon v-if="thread.status === 'expired'" color="warning">{{- mdiAlert- }}</v-icon>- <v-icon v-else-if="thread.status === 'delivered'" color="primary">+ <v-icon+ v-if="thread.status === 'expired'"+ color="warning"+ small+ >{{ mdiAlert }}</v-icon+ >+ <v-icon+ v-else-if="thread.status === 'delivered'"+ color="primary"+ small+ >{{ mdiCheckAll }}</v-icon>- <v-icon v-else-if="thread.status === 'received'" color="success">+ <v-icon+ v-else-if="thread.status === 'received'"+ color="success"+ small+ >{{ mdiCheckAll }}</v-icon><v-icon v-else-if="thread.status === 'sent'">{{ mdiCheck }}</v-icon>- <v-icon v-else-if="thread.status === 'failed'" color="error">+ <v-icon+ v-else-if="thread.status === 'failed'"+ color="error"+ small+ >{{ mdiAlert }}</v-icon></v-list-item-action>