Skip to content

BOT API v7.10 #402

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

Merged
merged 4 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add PaidMediaPurchased to Update
  • Loading branch information
anfanik committed Oct 31, 2024
commit cac9720d543970f990e2461f6bca10f3da5f490f
10 changes: 9 additions & 1 deletion library/src/main/java/com/pengrad/telegrambot/model/Update.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.pengrad.telegrambot.model.business.BusinessMessageDeleted;
import com.pengrad.telegrambot.model.chatboost.ChatBoostRemoved;
import com.pengrad.telegrambot.model.chatboost.ChatBoostUpdated;
import com.pengrad.telegrambot.model.paidmedia.PaidMediaPurchased;

import java.io.Serializable;
import java.util.Objects;
Expand Down Expand Up @@ -38,6 +39,7 @@ public class Update implements Serializable {
private MessageReactionCountUpdated message_reaction_count;
private ChatBoostUpdated chat_boost;
private ChatBoostRemoved removed_chat_boost;
private PaidMediaPurchased paid_media_purchased;

public Integer updateId() {
return update_id;
Expand Down Expand Up @@ -131,6 +133,10 @@ public ChatBoostRemoved removedChatBoost() {
return removed_chat_boost;
}

public PaidMediaPurchased paidMediaPurchased() {
return paid_media_purchased;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
Expand Down Expand Up @@ -158,7 +164,8 @@ public boolean equals(Object o) {
Objects.equals(message_reaction, update.message_reaction) &&
Objects.equals(message_reaction_count, update.message_reaction_count) &&
Objects.equals(chat_boost, update.chat_boost) &&
Objects.equals(removed_chat_boost, update.removed_chat_boost);
Objects.equals(removed_chat_boost, update.removed_chat_boost) &&
Objects.equals(paid_media_purchased, update.paid_media_purchased);
}

@Override
Expand Down Expand Up @@ -192,6 +199,7 @@ public String toString() {
", message_reaction_count=" + message_reaction_count +
", chat_boost=" + chat_boost +
", removed_chat_boost=" + removed_chat_boost +
", paid_media_purchased=" + paid_media_purchased +
'}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.pengrad.telegrambot.model.paidmedia

import com.pengrad.telegrambot.model.User

data class PaidMediaPurchased(
@get:JvmName("user") val from: User,
@get:JvmName("paidMediaPayload") val paidMediaPayload: String
)