From 8764be74616bde87bbbf6c32901cd9f43264d1e0 Mon Sep 17 00:00:00 2001 From: Ivanik Date: Fri, 29 Jan 2021 04:25:14 +0500 Subject: Add vk bridge (#1372) * Add vk bridge * Vk bridge attachments * Vk bridge forwarded messages * Vk bridge sample config and code cleanup * Vk bridge add vendor * Vk bridge message edit * Vk bridge: fix fetching names of other bots * Vk bridge: code cleanup * Vk bridge: fix shadows declaration * Vk bridge: remove UseFileURL --- .../SevereCloud/vksdk/v2/object/notes.go | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 vendor/github.com/SevereCloud/vksdk/v2/object/notes.go (limited to 'vendor/github.com/SevereCloud/vksdk/v2/object/notes.go') diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/notes.go b/vendor/github.com/SevereCloud/vksdk/v2/object/notes.go new file mode 100644 index 00000000..c238256e --- /dev/null +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/notes.go @@ -0,0 +1,37 @@ +package object // import "github.com/SevereCloud/vksdk/v2/object" + +import ( + "fmt" +) + +// NotesNote struct. +type NotesNote struct { + CanComment BaseBoolInt `json:"can_comment"` // Information whether current user can comment the note + Comments int `json:"comments"` // Comments number + Date int `json:"date"` // Date when the note has been created in Unixtime + ID int `json:"id"` // Note ID + OwnerID int `json:"owner_id"` // Note owner's ID + Text string `json:"text"` // Note text + TextWiki string `json:"text_wiki"` // Note text in wiki format + Title string `json:"title"` // Note title + ViewURL string `json:"view_url"` // URL of the page with note preview + ReadComments int `json:"read_comments"` + PrivacyView []interface{} `json:"privacy_view"` // NOTE: old type privacy + PrivacyComment []interface{} `json:"privacy_comment"` // NOTE: old type privacy +} + +// ToAttachment return attachment format. +func (note NotesNote) ToAttachment() string { + return fmt.Sprintf("note%d_%d", note.OwnerID, note.ID) +} + +// NotesNoteComment struct. +type NotesNoteComment struct { + Date int `json:"date"` // Date when the comment has been added in Unixtime + ID int `json:"id"` // Comment ID + Message string `json:"message"` // Comment text + NID int `json:"nid"` // Note ID + OID int `json:"oid"` // Note ID + ReplyTo int `json:"reply_to"` // ID of replied comment + UID int `json:"uid"` // Comment author's ID +} -- cgit v1.2.3