Add channel to delete message

This commit is contained in:
Denis Arh
2018-07-28 11:20:44 +02:00
parent d4e6731b1e
commit 99401065a7
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ type (
}
MessageDelete struct {
ID string `json:"id"`
ChannelID string `json:"cid"`
ID string `json:"id"`
}
)
+2 -2
View File
@@ -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})
}