20 lines
496 B
C++
20 lines
496 B
C++
#include "message.h"
|
|
|
|
bool Message::operator==(const Message& m) const {
|
|
return (m.chatid == chatid) && (m.messageid == messageid);
|
|
}
|
|
|
|
bool Message::operator!=(const Message& m) const {
|
|
return (m.chatid != chatid) || (m.messageid != messageid);
|
|
}
|
|
|
|
bool Message::operator<(const Message& m) const {
|
|
if (chatid < m.chatid) return true;
|
|
if (chatid > m.chatid) return false;
|
|
// chatid == m.chatid
|
|
return (messageid < m.messageid);
|
|
}
|
|
|
|
bool Message::hasFile() const {
|
|
return !filename.empty();
|
|
} |