Skip to content

Commit

Permalink
Tests: Add a stub for message silent flag (TpQt 0.9.8 API)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaffeine committed Sep 24, 2020
1 parent ab7d1a4 commit ab078fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/stubs/TelepathyQt/message.cpp
Expand Up @@ -491,6 +491,18 @@ bool ReceivedMessage::isScrollback() const
return booleanFromPart(mPriv->parts, 0, "scrollback", false);
}

/**
* Return whether the incoming message should trigger a user notification.
*
* If \c true, UI should not notify the user about this message.
*
* \return \c true if the silent flag is set, \c false otherwise.
*/
bool ReceivedMessage::isSilent() const
{
return booleanFromPart(mPriv->parts, 0, "silent", false);
}

/**
* Return the details of a delivery report.
*
Expand Down
1 change: 1 addition & 0 deletions tests/stubs/TelepathyQt/message.h
Expand Up @@ -119,6 +119,7 @@ class ReceivedMessage : public Message
QDateTime received() const;
ContactPtr sender() const;
bool isScrollback() const;
bool isSilent() const;

DeliveryDetails deliveryDetails() const;

Expand Down

0 comments on commit ab078fc

Please sign in to comment.