Browse Source

Do not "load" conversations without a token

This is only a temporary solution. We should try to find out where the rooms origin from
and then either delete them all together, or fix them.
But since they have no token, you can't join them anyway
and therefor wont miss them for now.

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/1748/head
Joas Schilling 7 years ago
parent
commit
e8f37a9f77
No known key found for this signature in database GPG Key ID: 7076EA9751AACDDA
  1. 45
      lib/Manager.php

45
lib/Manager.php

@ -87,6 +87,11 @@ class Manager {
$result = $query->execute();
while ($row = $result->fetch()) {
if ($row['token'] === null) {
// FIXME Temporary solution for the Talk6 release
continue;
}
$room = $this->createRoomObject($row);
$callback($room);
}
@ -160,6 +165,11 @@ class Manager {
$result = $query->execute();
$rooms = [];
while ($row = $result->fetch()) {
if ($row['token'] === null) {
// FIXME Temporary solution for the Talk6 release
continue;
}
$room = $this->createRoomObject($row);
if ($participant !== null && isset($row['user_id'])) {
$room->setParticipant($row['user_id'], $this->createParticipantObject($room, $row));
@ -202,6 +212,11 @@ class Manager {
throw new RoomNotFoundException();
}
if ($row['token'] === null) {
// FIXME Temporary solution for the Talk6 release
throw new RoomNotFoundException();
}
$room = $this->createRoomObject($row);
if ($participant !== null && isset($row['user_id'])) {
$room->setParticipant($row['user_id'], $this->createParticipantObject($room, $row));
@ -252,6 +267,11 @@ class Manager {
throw new RoomNotFoundException();
}
if ($row['token'] === null) {
// FIXME Temporary solution for the Talk6 release
throw new RoomNotFoundException();
}
$room = $this->createRoomObject($row);
if ($participant !== null && isset($row['user_id'])) {
$room->setParticipant($row['user_id'], $this->createParticipantObject($room, $row));
@ -287,6 +307,11 @@ class Manager {
throw new RoomNotFoundException();
}
if ($row['token'] === null) {
// FIXME Temporary solution for the Talk6 release
throw new RoomNotFoundException();
}
return $this->createRoomObject($row);
}
@ -309,6 +334,11 @@ class Manager {
throw new RoomNotFoundException();
}
if ($row['token'] === null) {
// FIXME Temporary solution for the Talk6 release
throw new RoomNotFoundException();
}
return $this->createRoomObject($row);
}
@ -333,6 +363,11 @@ class Manager {
throw new RoomNotFoundException();
}
if ($row['token'] === null) {
// FIXME Temporary solution for the Talk6 release
throw new RoomNotFoundException();
}
return $this->createRoomObject($row);
}
@ -366,6 +401,11 @@ class Manager {
throw new RoomNotFoundException();
}
if ($row['token'] === null) {
// FIXME Temporary solution for the Talk6 release
throw new RoomNotFoundException();
}
$room = $this->createRoomObject($row);
$participant = $this->createParticipantObject($room, $row);
$room->setParticipant($row['user_id'], $participant);
@ -419,6 +459,11 @@ class Manager {
throw new RoomNotFoundException();
}
if ($row['token'] === null) {
// FIXME Temporary solution for the Talk6 release
throw new RoomNotFoundException();
}
return $this->createRoomObject($row);
}

Loading…
Cancel
Save