2018-08-16 22:30:59 +00:00
|
|
|
<?php
|
2022-03-04 17:10:24 +00:00
|
|
|
|
2018-08-16 22:30:59 +00:00
|
|
|
/*
|
2022-03-04 17:10:24 +00:00
|
|
|
* Copyright (c) 2010-2022 Tim Düsterhus.
|
2018-08-16 22:30:59 +00:00
|
|
|
*
|
|
|
|
* Use of this software is governed by the Business Source License
|
|
|
|
* included in the LICENSE file.
|
|
|
|
*
|
2022-03-04 17:10:24 +00:00
|
|
|
* Change Date: 2026-03-04
|
2018-08-16 22:30:59 +00:00
|
|
|
*
|
|
|
|
* On the date above, in accordance with the Business Source
|
|
|
|
* License, use of this software will be governed by version 2
|
|
|
|
* or later of the General Public License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace chat\system\message\type;
|
|
|
|
|
2022-03-04 17:10:24 +00:00
|
|
|
use chat\data\message\Message;
|
|
|
|
use wcf\data\user\UserProfile;
|
2018-08-16 22:30:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* An IDeletableMessageType defines that the implementing message type supports message deletion.
|
|
|
|
*/
|
2022-03-04 17:10:24 +00:00
|
|
|
interface IDeletableMessageType extends IMessageType
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Returns whether the given user may delete the given message. If no
|
|
|
|
* user is given the active user should be assumed.
|
|
|
|
*
|
|
|
|
* @param Message $message
|
|
|
|
* @param UserProfile $user
|
|
|
|
* @return boolean
|
|
|
|
*/
|
|
|
|
public function canDelete(Message $message, ?UserProfile $user = null);
|
2018-08-16 22:30:59 +00:00
|
|
|
}
|