(ctx context.Context, id int64)
| 6407 | } |
| 6408 | |
| 6409 | func (q *querier) SoftDeleteChatMessageByID(ctx context.Context, id int64) error { |
| 6410 | msg, err := q.db.GetChatMessageByID(ctx, id) |
| 6411 | if err != nil { |
| 6412 | return err |
| 6413 | } |
| 6414 | chat, err := q.db.GetChatByID(ctx, msg.ChatID) |
| 6415 | if err != nil { |
| 6416 | return err |
| 6417 | } |
| 6418 | if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil { |
| 6419 | return err |
| 6420 | } |
| 6421 | return q.db.SoftDeleteChatMessageByID(ctx, id) |
| 6422 | } |
| 6423 | |
| 6424 | func (q *querier) SoftDeleteChatMessagesAfterID(ctx context.Context, arg database.SoftDeleteChatMessagesAfterIDParams) error { |
| 6425 | chat, err := q.db.GetChatByID(ctx, arg.ChatID) |
nothing calls this directly
no test coverage detected