Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to v7.4 #154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: upgrade to v7.4 #154

wants to merge 1 commit into from

Conversation

mr-linch
Copy link
Owner

@mr-linch mr-linch commented Jun 3, 2024

  • define sum type for BackgroundFill and BackgroundType (may be generate?)

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.39%. Comparing base (30d99f1) to head (2ba9c17).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #154   +/-   ##
=======================================
  Coverage   95.39%   95.39%           
=======================================
  Files          24       24           
  Lines        2672     2672           
=======================================
  Hits         2549     2549           
  Misses         84       84           
  Partials       39       39           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mr-linch mr-linch marked this pull request as ready for review June 3, 2024 15:19
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mr-linch - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 5 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -336,13 +336,19 @@ func (call *SendMessageCall) ProtectContent(protectContent bool) *SendMessageCal
return call
}

// MessageEffectID Unique identifier of the message effect to be added to the message; for private chats only
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Clarify the scope of MessageEffectID

Consider clarifying whether MessageEffectID is applicable only to private chats or if it can be used in other contexts as well.

@@ -559,6 +565,12 @@
return call
}

// ShowCaptionAboveMedia Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Clarify the behavior of ShowCaptionAboveMedia

Consider clarifying the behavior when ShowCaptionAboveMedia is true, especially in cases where the media type does not support captions.

Suggested change
// ShowCaptionAboveMedia Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified.
// ShowCaptionAboveMedia Pass True if the caption must be shown above the message media. Note: This may be ignored for media types that do not support captions or if a new caption isn't specified.

@@ -1850,8 +1946,8 @@
// NewSendPollCall constructs a new SendPollCall with required parameters.
// chatID - Unique identifier for the target chat or username of the target channel (in the format @channelusername)
// question - Poll question, 1-300 characters
// options - A JSON-serialized list of answer options, 2-10 strings 1-100 characters each
func NewSendPollCall(chatID PeerID, question string, options []string) *SendPollCall {
// options - A JSON-serialized list of 2-10 answer options
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Clarify the format of options

Consider specifying the expected format or constraints of the options array.

Suggested change
// options - A JSON-serialized list of 2-10 answer options
// options - A JSON-serialized list of 2-10 answer options, each an InputPollOption object

// currency - Three-letter ISO 4217 currency code, see more on currencies
// prices - Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
func NewSendInvoiceCall(chatID PeerID, title string, description string, payload string, providerToken string, currency string, prices []LabeledPrice) *SendInvoiceCall {
// currency - Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Clarify the use of 'XTR' for payments

Consider adding more context or a reference to documentation for the use of 'XTR' for payments in Telegram Stars.

Suggested change
// currency - Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.
// currency - Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.
// currency - Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars (see documentation for details).

@@ -6466,6 +6606,45 @@
return call
}

// RefundStarPaymentCall reprenesents a call to the refundStarPayment method.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): Typo in comment

There is a typo in the comment: 'reprenesents' should be 'represents'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant