Fix. notification did not reach ALL target

Former-commit-id: 237e5dac34bcbe50453e0b56f0964a9d74aa7c04
This commit is contained in:
fbsanchez 2019-02-18 14:18:58 +01:00
parent 34cf0bd837
commit 7b2e0342c1
3 changed files with 9 additions and 4 deletions

View File

@ -384,7 +384,7 @@ function messages_get_count(
AND up.id_grupo=ng.id_group
) ON tm.id_mensaje=ng.id_mensaje
WHERE utimestamp_erased is null
AND (nu.id_user="%s" OR (up.id_usuario="%s" AND ng.id_group=0))
AND (nu.id_user="%s" OR up.id_usuario="%s" OR ng.id_group=0)
) t
%s',
$source_sql,
@ -496,7 +496,7 @@ function messages_get_overview(
) ON tm.id_mensaje=ng.id_mensaje
%s
WHERE utimestamp_erased is null
AND (nu.id_user="%s" OR (up.id_usuario="%s" AND ng.id_group=0))
AND (nu.id_user="%s" OR up.id_usuario="%s" OR ng.id_group=0)
) t
%s
%s

View File

@ -145,7 +145,7 @@ function check_notification_readable(int $id_message)
AND up.id_grupo=ng.id_group
) ON tm.id_mensaje=ng.id_mensaje
WHERE utimestamp_erased is null
AND (nu.id_user="%s" OR (up.id_usuario="%s" AND ng.id_group=0))',
AND (nu.id_user="%s" OR up.id_usuario="%s" OR ng.id_group=0)',
$config['id_user'],
$id_message,
$config['id_user'],

View File

@ -106,7 +106,12 @@ if ($read_message) {
$dst_name = $message['id_usuario_destino'];
}
echo '<h1>Conversation with '.$user_name.'</h1>';
if (isset($user_name) !== true || empty($user_name) === true) {
echo '<h1>Notification</h1>';
} else {
echo '<h1>Conversation with '.$user_name.'</h1>';
}
echo '<h2>Subject: '.$message['subject'].'</h2>';
$conversation = [];