Update src/Module/Api/Friendica/DirectMessages/Setseen.php
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
293775ab4a
commit
4587cef677
|
@ -51,15 +51,12 @@ class Setseen extends BaseApi
|
||||||
}
|
}
|
||||||
|
|
||||||
// update seen indicator
|
// update seen indicator
|
||||||
$result = DBA::update('mail', ['seen' => true], ['id' => $request['id']]);
|
if (DBA::update('mail', ['seen' => true], ['id' => $request['id']])) {
|
||||||
|
|
||||||
if ($result) {
|
|
||||||
// return success
|
|
||||||
$answer = ['result' => 'ok', 'message' => 'message set to seen'];
|
$answer = ['result' => 'ok', 'message' => 'message set to seen'];
|
||||||
self::exit('direct_messages_setseen', ['$result' => $answer], $parameters['extension'] ?? null);
|
|
||||||
} else {
|
} else {
|
||||||
$answer = ['result' => 'error', 'message' => 'unknown error'];
|
$answer = ['result' => 'error', 'message' => 'unknown error'];
|
||||||
self::exit('direct_messages_setseen', ['$result' => $answer], $parameters['extension'] ?? null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self::exit('direct_messages_setseen', ['$result' => $answer], $parameters['extension'] ?? null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user