fix wrong data in compat_ids (requery.php)

This commit is contained in:
Mike Schwörer 2023-06-23 11:50:18 +02:00
parent 1bb37eec30
commit f3658d6636
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
2 changed files with 2 additions and 2 deletions

View File

@ -528,7 +528,7 @@ func (h CompatHandler) Requery(g *gin.Context) ginresp.HTTPResponse {
compMsgs := make([]models.CompatMessage, 0, len(msgs)) compMsgs := make([]models.CompatMessage, 0, len(msgs))
for _, v := range msgs { for _, v := range msgs {
messageIdComp, err := h.database.ConvertToCompatIDOrCreate(ctx, v.MessageID.String(), "messageid") messageIdComp, err := h.database.ConvertToCompatIDOrCreate(ctx, "messageid", v.MessageID.String())
if err != nil { if err != nil {
return ginresp.SendAPIError(g, 500, apierr.DATABASE_ERROR, hl.NONE, "Failed to query/create messageid<old>", err) return ginresp.SendAPIError(g, 500, apierr.DATABASE_ERROR, hl.NONE, "Failed to query/create messageid<old>", err)
} }

View File

@ -168,7 +168,7 @@ func (j *DeliveryRetryJob) redeliver(ctx *logic.SimpleContext, delivery models.D
var msgidOverride *string = nil var msgidOverride *string = nil
if isCompatClient { if isCompatClient {
messageIdComp, err := j.app.Database.Primary.ConvertToCompatIDOrCreate(ctx, msg.MessageID.String(), "messageid") messageIdComp, err := j.app.Database.Primary.ConvertToCompatIDOrCreate(ctx, "messageid", msg.MessageID.String())
if err != nil { if err != nil {
log.Err(err).Str("MessageID", delivery.MessageID.String()).Str("ClientID", client.ClientID.String()).Msg("Failed to query/create messageid") log.Err(err).Str("MessageID", delivery.MessageID.String()).Str("ClientID", client.ClientID.String()).Msg("Failed to query/create messageid")
ctx.RollbackTransaction() ctx.RollbackTransaction()