mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: minor cleanup (#2124)
This commit is contained in:
@ -36,7 +36,7 @@ const (
|
||||
SystemSettingStorageServiceIDName SystemSettingName = "storage-service-id"
|
||||
// SystemSettingLocalStoragePathName is the name of local storage path.
|
||||
SystemSettingLocalStoragePathName SystemSettingName = "local-storage-path"
|
||||
// SystemSettingTelegramBotToken is the name of Telegram Bot Token.
|
||||
// SystemSettingTelegramBotTokenName is the name of Telegram Bot Token.
|
||||
SystemSettingTelegramBotTokenName SystemSettingName = "telegram-bot-token"
|
||||
// SystemSettingMemoDisplayWithUpdatedTsName is the name of memo display with updated ts.
|
||||
SystemSettingMemoDisplayWithUpdatedTsName SystemSettingName = "memo-display-with-updated-ts"
|
||||
|
@ -20,7 +20,7 @@ const (
|
||||
UserSettingAppearanceKey UserSettingKey = "appearance"
|
||||
// UserSettingMemoVisibilityKey is the key type for user preference memo default visibility.
|
||||
UserSettingMemoVisibilityKey UserSettingKey = "memo-visibility"
|
||||
// UserSettingTelegramUserID is the key type for telegram UserID of memos user.
|
||||
// UserSettingTelegramUserIDKey is the key type for telegram UserID of memos user.
|
||||
UserSettingTelegramUserIDKey UserSettingKey = "telegram-user-id"
|
||||
)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 1.Prepare your workspace by:
|
||||
# docker compose run api go install github.com/cosmtrek/air@latest
|
||||
# docker compose run web npm install
|
||||
# docker compose -f docker-compose.dev.yaml run api go install github.com/cosmtrek/air@latest
|
||||
# docker compose -f docker-compose.dev.yaml run web npm install
|
||||
#
|
||||
# 2. Start you work by:
|
||||
# docker compose up -d
|
||||
|
@ -29,7 +29,7 @@ func NewBotWithHandler(h Handler) *Bot {
|
||||
const noTokenWait = 30 * time.Second
|
||||
const errRetryWait = 10 * time.Second
|
||||
|
||||
// Start start an infinity call of getUpdates from Telegram, call r.MessageHandle while get new message updates.
|
||||
// Start start a long polling using getUpdates to get Update, call r.MessageHandle while get new message updates.
|
||||
func (b *Bot) Start(ctx context.Context) {
|
||||
var offset int
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
package telegram
|
||||
|
||||
// CallbackQuery represents an incoming callback query from a callback button in
|
||||
// an inline keyboard (PUBLIC, PROTECTED, PRIVATE).
|
||||
type CallbackQuery struct {
|
||||
ID string `json:"id"`
|
||||
From User `json:"from"`
|
||||
|
@ -14,7 +14,7 @@ type Message struct {
|
||||
Photo []PhotoSize `json:"photo"` // Photo message is a photo, available sizes of the photo;
|
||||
Caption *string `json:"caption"` // Caption for the animation, audio, document, photo, video or voice, 0-1024 characters;
|
||||
Entities []MessageEntity `json:"entities"` // Entities are for text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text;
|
||||
CaptionEntities []MessageEntity `json:"caption_entities"`
|
||||
CaptionEntities []MessageEntity `json:"caption_entities"` // CaptionEntities are for messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption;
|
||||
Document *Document `json:"document"` // Document message is a general file, information about the file;
|
||||
Video *Video `json:"video"` // Video message is a video, information about the video;
|
||||
VideoNote *VideoNote `json:"video_note"` // VideoNote message is a video note, information about the video message;
|
||||
|
Reference in New Issue
Block a user