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
|
||||
$result = DBA::update('mail', ['seen' => true], ['id' => $request['id']]);
|
||||
|
||||
if ($result) {
|
||||
// return success
|
||||
if (DBA::update('mail', ['seen' => true], ['id' => $request['id']])) {
|
||||
$answer = ['result' => 'ok', 'message' => 'message set to seen'];
|
||||
self::exit('direct_messages_setseen', ['$result' => $answer], $parameters['extension'] ?? null);
|
||||
} else {
|
||||
$answer = ['result' => 'error', 'message' => 'unknown error'];
|
||||
}
|
||||
|
||||
self::exit('direct_messages_setseen', ['$result' => $answer], $parameters['extension'] ?? null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue