Skip to content

Shared files are returned as system messages #8858

@SystemKeeper

Description

@SystemKeeper

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Open a conversation with shared files

Expected behaviour

Preview of the file / image should be shown. The message is reactable and can be replied to.

Actual behaviour

The message is received as a system message which neither is reactable, nor can be replied to.

Additional infos

The problem comes from #8798, in particular this part:

if (isset($metaData['messageType'])) {
if ($metaData['messageType'] === 'voice-message') {
$chatMessage->setMessageType('voice-message');
} elseif ($metaData['messageType'] === 'record-audio') {
$chatMessage->setMessageType('record-audio');
} elseif ($metaData['messageType'] === 'record-video') {
$chatMessage->setMessageType('record-video');
}
} else {
$chatMessage->setMessageType(ChatManager::VERB_MESSAGE);
}

For files shared $metaData['messageType'] is set, but looks like it's an empty string?! Before the change the check for voice-message would fail and therefore fallback to setting the message type to ChatMananger::VERB_MESSAGE, this is not the case anymore.

Comparison NC 25.0.4 and NC 26 Beta 5:
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions