Skip to content

Commit

Permalink
Merge pull request #362 from anfanik/master
Browse files Browse the repository at this point in the history
Add setters to LinkPreviewOptions & open Message#forwardOrigin
  • Loading branch information
pengrad authored Jan 26, 2024
2 parents 34b08ef + 12177d0 commit 6b9b487
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,50 @@ public class LinkPreviewOptions implements Serializable {
private Boolean prefer_large_media;
private Boolean show_above_text;


public Boolean isDisabled() {
return is_disabled;
}

public LinkPreviewOptions isDisabled(boolean isDisabled) {
this.is_disabled = isDisabled;
return this;
}

public String url() {
return url;
}

public LinkPreviewOptions url(String url) {
this.url = url;
return this;
}

public Boolean preferSmallMedia() {
return prefer_small_media;
}

public LinkPreviewOptions preferSmallMedia(Boolean preferSmallMedia) {
this.prefer_small_media = preferSmallMedia;
return this;
}

public Boolean preferLargeMedia() {
return prefer_large_media;
}

public LinkPreviewOptions preferLargeMedia(Boolean preferLargeMedia) {
this.prefer_large_media = preferLargeMedia;
return this;
}

public Boolean showAboveText() {
return show_above_text;
}

public LinkPreviewOptions showAboveText(Boolean showAboveText) {
this.show_above_text = showAboveText;
return this;
}

@Override
public boolean equals(Object o) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public Chat senderChat() {
return sender_chat;
}

private MessageOrigin forwardOrigin() {
public MessageOrigin forwardOrigin() {
return forward_origin;
}

Expand Down

0 comments on commit 6b9b487

Please sign in to comment.