mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
fix(chatrelay): add reaction comment id to signaling message
Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
parent
898b378d6d
commit
25c7b7bb6b
3 changed files with 9 additions and 3 deletions
|
|
@ -80,7 +80,7 @@ class ReactionManager {
|
|||
|
||||
$this->commentsManager->save($comment);
|
||||
|
||||
$event = new ReactionAddedEvent($chat, $parentMessage, $actorType, $actorId, $actorDisplayName, $reaction);
|
||||
$event = new ReactionAddedEvent($chat, $parentMessage, $actorType, $actorId, $actorDisplayName, $reaction, $comment);
|
||||
$this->dispatcher->dispatchTyped($event);
|
||||
|
||||
$this->notifier->notifyReacted($chat, $parentMessage, $comment);
|
||||
|
|
@ -136,7 +136,7 @@ class ReactionManager {
|
|||
true
|
||||
);
|
||||
|
||||
$event = new ReactionRemovedEvent($chat, $parentComment, $actorType, $actorId, $actorDisplayName, $reaction);
|
||||
$event = new ReactionRemovedEvent($chat, $parentComment, $actorType, $actorId, $actorDisplayName, $reaction, $comment);
|
||||
$this->dispatcher->dispatchTyped($event);
|
||||
|
||||
return $comment;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ abstract class AReactionEvent extends ARoomEvent {
|
|||
protected string $actorId,
|
||||
protected string $actorDisplayName,
|
||||
protected string $reaction,
|
||||
protected ?IComment $reactionMessage = null,
|
||||
) {
|
||||
parent::__construct($room);
|
||||
}
|
||||
|
|
@ -27,6 +28,11 @@ abstract class AReactionEvent extends ARoomEvent {
|
|||
return $this->message;
|
||||
}
|
||||
|
||||
public function getReactionMessage(): ?IComment {
|
||||
return $this->reactionMessage;
|
||||
}
|
||||
|
||||
|
||||
public function getActorType(): string {
|
||||
return $this->actorType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@ class Listener implements IEventListener {
|
|||
$this->messageParser->parseMessage($message);
|
||||
// Build reaction message data
|
||||
$data['chat']['comment'] = [
|
||||
'id' => null,
|
||||
'id' => $event->getReactionMessage()?->getId(),
|
||||
'token' => $event->getRoom()->getToken(),
|
||||
'actorType' => $event->getActorType(),
|
||||
'actorId' => $event->getActorId(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue