Avoids returning an error if sharing a direct channel fails after its creation (#26895)

* Avoids returning an error if sharing a direct channel fails after its creation

* Update logline to use snake-case

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Miguel de la Cruz 2024-04-26 18:07:48 +02:00 committed by GitHub
parent 322a500092
commit a6aa92d149
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 5 deletions

View File

@ -481,7 +481,7 @@ func (a *App) createDirectChannelWithUser(c request.CTX, user, otherUser *model.
}
if _, err := a.ShareChannel(c, sc); err != nil {
return nil, model.NewAppError("CreateDirectChannel", "app.sharedchannel.dm_channel_creation.internal_error", nil, "", http.StatusInternalServerError).Wrap(err)
c.Logger().Error("Failed to share newly created direct channel", mlog.String("channel_id", channel.Id), mlog.Err(err))
}
}

View File

@ -6478,10 +6478,6 @@
"id": "app.session.update_device_id.app_error",
"translation": "Unable to update the device id."
},
{
"id": "app.sharedchannel.dm_channel_creation.internal_error",
"translation": "Encountered an error while creating a direct shared channel."
},
{
"id": "app.status.get.app_error",
"translation": "Encountered an error retrieving the status."