Add channel to delete message
This commit is contained in:
@@ -12,6 +12,7 @@ type (
|
||||
}
|
||||
|
||||
MessageDelete struct {
|
||||
ID string `json:"id"`
|
||||
ChannelID string `json:"cid"`
|
||||
ID string `json:"id"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -48,6 +48,6 @@ func (s *Session) messageDelete(ctx context.Context, payload *incoming.Payload)
|
||||
if err := service.Message().Delete(ctx, id); err != nil {
|
||||
return err
|
||||
}
|
||||
// @todo: delete broadcast to channel
|
||||
return s.sendMessageChannel("TODO", &outgoing.MessageDelete{request.ID})
|
||||
|
||||
return s.sendMessageChannel(request.ChannelID, &outgoing.MessageDelete{request.ID})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user