Support RepliedMessageInfo logging.
This commit is contained in:
parent
d839e5b68c
commit
e791c98757
@ -199,4 +199,15 @@ bool operator!=(const RepliedMessageInfo &lhs, const RepliedMessageInfo &rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
StringBuilder &operator<<(StringBuilder &string_builder, const RepliedMessageInfo &info) {
|
||||
string_builder << "reply to " << info.message_id_;
|
||||
if (info.dialog_id_ != DialogId()) {
|
||||
string_builder << " in " << info.dialog_id_;
|
||||
}
|
||||
if (info.origin_date_ != 0) {
|
||||
string_builder << " sent at " << info.origin_date_ << " by " << info.origin_;
|
||||
}
|
||||
return string_builder;
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -31,6 +31,8 @@ class RepliedMessageInfo {
|
||||
|
||||
friend bool operator==(const RepliedMessageInfo &lhs, const RepliedMessageInfo &rhs);
|
||||
|
||||
friend StringBuilder &operator<<(StringBuilder &string_builder, const RepliedMessageInfo &info);
|
||||
|
||||
public:
|
||||
RepliedMessageInfo() = default;
|
||||
|
||||
@ -82,4 +84,6 @@ bool operator==(const RepliedMessageInfo &lhs, const RepliedMessageInfo &rhs);
|
||||
|
||||
bool operator!=(const RepliedMessageInfo &lhs, const RepliedMessageInfo &rhs);
|
||||
|
||||
StringBuilder &operator<<(StringBuilder &string_builder, const RepliedMessageInfo &info);
|
||||
|
||||
} // namespace td
|
||||
|
Loading…
Reference in New Issue
Block a user