mirror of
https://github.com/QuasarApp/qTbot.git
synced 2025-04-26 13:54:31 +00:00
added fullText method of TelegramMessage
This commit is contained in:
parent
9547b0c503
commit
dd6eb8b815
@ -84,6 +84,14 @@ QString TelegramMsg::text() const {
|
||||
return rawJson()["text"].toString();
|
||||
}
|
||||
|
||||
QString TelegramMsg::fullText() const {
|
||||
return rawJson()["text"].toString() + rawJson()["caption"].toString();
|
||||
}
|
||||
|
||||
QString TelegramMsg::caption() const {
|
||||
return rawJson()["caption"].toString();
|
||||
}
|
||||
|
||||
bool TelegramMsg::contains(const Type &type) {
|
||||
return rawJson().contains(type);
|
||||
}
|
||||
|
@ -169,6 +169,18 @@ public:
|
||||
*/
|
||||
QString text() const;
|
||||
|
||||
/**
|
||||
* @brief fullText return text + caption value
|
||||
* @return text + caption value
|
||||
*/
|
||||
QString fullText() const;
|
||||
|
||||
/**
|
||||
* @brief caption return only caption value
|
||||
* @return only caption value
|
||||
*/
|
||||
QString caption() const;
|
||||
|
||||
/**
|
||||
* @brief contains This method returns true if the message contains choosed data type.
|
||||
* @param type This is name of the type
|
||||
|
Loading…
x
Reference in New Issue
Block a user