diff options
Diffstat (limited to 'vendor/gomod.garykim.dev/nc-talk/ocs/message.go')
-rw-r--r-- | vendor/gomod.garykim.dev/nc-talk/ocs/message.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/gomod.garykim.dev/nc-talk/ocs/message.go b/vendor/gomod.garykim.dev/nc-talk/ocs/message.go index d4766006..1a8f95dc 100644 --- a/vendor/gomod.garykim.dev/nc-talk/ocs/message.go +++ b/vendor/gomod.garykim.dev/nc-talk/ocs/message.go @@ -35,6 +35,15 @@ const ( // MessageCommand is a Nextcloud Talk message that is a command MessageCommand MessageType = "command" + // MessageDelete is a Nextcloud Talk message indicating a message that was deleted + // + // If a message has been deleted, a message of MessageType MessageSystem is + // sent through the channel for which the parent message's MessageType is MessageDelete. + // So, in order to check if a new message is a message deletion request, a check + // like this can be used: + // msg.MessageType == ocs.MessageSystem && msg.Parent != nil && msg.Parent.MessageType == ocs.MessageDelete + MessageDelete MessageType = "comment_deleted" + // ActorUser is a Nextcloud Talk message sent by a user ActorUser ActorType = "users" @@ -55,6 +64,8 @@ type TalkRoomMessageData struct { SystemMessage string `json:"systemMessage"` Timestamp int `json:"timestamp"` MessageType MessageType `json:"messageType"` + Deleted bool `json:"deleted"` + Parent *TalkRoomMessageData `json:"parent"` MessageParameters map[string]RichObjectString `json:"-"` } |