Skip to content

Commit

Permalink
Attempted fix for the errors on global chat
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam Svanåsbakken Crouch committed Feb 13, 2015
1 parent 2eb5313 commit 9be70bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion json/chat/getLastChatMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$chat = ChatHandler::getChat($_GET['id']);

if ($chat != null) {
if (ChatHandler::isChatMember($user, $chat) || $user->hasPermission('*') || $user->hasPermission('compo.chat')) {
if (ChatHandler::isChatMember($user, $chat) || $user->hasPermission('*') || $user->hasPermission('compo.chat') || $chat->getId() == 1) {
$message = ChatHandler::getLastChatMessage($chat);

if (isset($message)) {
Expand Down
2 changes: 1 addition & 1 deletion json/chat/getLastChatMessages.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$chat = ChatHandler::getChat($_GET['id']);

if ($chat != null) {
if (ChatHandler::isChatMember($user, $chat) || $user->hasPermission('*') || $user->hasPermission('compo.chat')) {
if (ChatHandler::isChatMember($user, $chat) || $user->hasPermission('*') || $user->hasPermission('compo.chat') || $chat->getId() == 1) {
$messages = ChatHandler::getLastMessages($chat, $_GET['count']);
$result = array();

Expand Down

0 comments on commit 9be70bc

Please sign in to comment.