-
Notifications
You must be signed in to change notification settings - Fork 511
Open
Labels
1. to developbugfeature: api π οΈOCS API for conversations, chats and participantsOCS API for conversations, chats and participantsfeature: chat π¬Chat and system messagesChat and system messages
Milestone
Description
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.
For easier reproduction, comment the following lines:
spreed/lib/Service/ThreadService.php
Lines 278 to 285 in 1f35a31
| $row = $this->cache->get(self::CACHE_PREFIX . $roomId . '/' . $potentialThreadId); | |
| if (!empty($row)) { | |
| return true; | |
| } | |
| if ($row === '') { | |
| return false; | |
| } |
Steps to reproduce
- Enter a thread and write a message
- Now try to schedule a message
Actual behaviour
OCA\\Talk\\Model\\Thread::fromJson(): Argument #1 ($json) must be of type string, array given
We set the $row as cache value at
spreed/lib/Service/ThreadService.php
Line 306 in 1f35a31
| $this->cache->set(self::CACHE_PREFIX . $roomId . '/' . $potentialThreadId, $row, 60 * 15); |
but in all other cases, it's a json string, e.g. at
spreed/lib/Service/ThreadService.php
Line 127 in 1f35a31
| $this->cache->set(self::CACHE_PREFIX . $thread->getRoomId() . '/' . $thread->getId(), $thread->toJson(), 60 * 15); |
So depending on where the cache entry was created, we crash at
spreed/lib/Service/ThreadService.php
Lines 62 to 65 in 1f35a31
| $row = $this->cache->get(self::CACHE_PREFIX . $roomId . '/' . $threadId); | |
| if (!empty($row)) { | |
| return Thread::fromJson($row); | |
| } |
Metadata
Metadata
Assignees
Labels
1. to developbugfeature: api π οΈOCS API for conversations, chats and participantsOCS API for conversations, chats and participantsfeature: chat π¬Chat and system messagesChat and system messages
Type
Projects
Status
π§ Planning evaluation (don't pick)