Compare commits
No commits in common. "main" and "main" have entirely different histories.
|
@ -3,4 +3,3 @@ cache/
|
||||||
tests/
|
tests/
|
||||||
minelife.html
|
minelife.html
|
||||||
vendors/keygen/__pycache__
|
vendors/keygen/__pycache__
|
||||||
erreurs/
|
|
|
@ -44,13 +44,6 @@ class GchangeUser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function constructVoidUser ($pubkey) {
|
|
||||||
|
|
||||||
$this->userGchangeId = $pubkey;
|
|
||||||
|
|
||||||
$this->userName = substr($this->userGchangeId, 0, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getUserGchangeId () {
|
public function getUserGchangeId () {
|
||||||
|
|
||||||
return $this->userGchangeId;
|
return $this->userGchangeId;
|
||||||
|
|
|
@ -62,7 +62,7 @@ class Jaklis {
|
||||||
$cmd .= ' read';
|
$cmd .= ' read';
|
||||||
$cmd .= ' --number ' . $this->msgLimit;
|
$cmd .= ' --number ' . $this->msgLimit;
|
||||||
$cmd .= ' --json';
|
$cmd .= ' --json';
|
||||||
|
|
||||||
$output=null;
|
$output=null;
|
||||||
$result_code=null;
|
$result_code=null;
|
||||||
exec($cmd, $output, $result_code);
|
exec($cmd, $output, $result_code);
|
||||||
|
|
|
@ -81,16 +81,7 @@ class Messenger {
|
||||||
|
|
||||||
if (!isset($users[$penpalPubkey])) {
|
if (!isset($users[$penpalPubkey])) {
|
||||||
|
|
||||||
try {
|
$this->users[$penpalPubkey] = $this->gchange->getUser($penpalPubkey);
|
||||||
|
|
||||||
$user = $this->gchange->getUser($penpalPubkey);
|
|
||||||
|
|
||||||
$this->users[$penpalPubkey] = $user;
|
|
||||||
|
|
||||||
} catch (Exception $e) {
|
|
||||||
|
|
||||||
$this->users[$penpalPubkey] = GchangeUser::constructVoidUser($penpalPubkey);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function getConversation ($penpalGchangeId) {
|
public function getConversation ($penpalGchangeId) {
|
||||||
|
|
|
@ -42,14 +42,7 @@ try {
|
||||||
// echo '<pre>'; var_dump($msgOut); echo '</pre>';
|
// echo '<pre>'; var_dump($msgOut); echo '</pre>';
|
||||||
// die();
|
// die();
|
||||||
|
|
||||||
try {
|
$messenger->addMessages($msgIn, $msgOut);
|
||||||
|
|
||||||
$messenger->addMessages($msgIn, $msgOut);
|
|
||||||
|
|
||||||
} catch (Exception $e) {
|
|
||||||
|
|
||||||
// L'utilisateur {...} n'a été trouvé nulle part.
|
|
||||||
}
|
|
||||||
|
|
||||||
// echo '<pre>'; var_dump($messenger->getConversations()); echo '</pre>';
|
// echo '<pre>'; var_dump($messenger->getConversations()); echo '</pre>';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue