Compare commits

..

No commits in common. "main" and "main" have entirely different histories.
main ... main

5 changed files with 3 additions and 27 deletions

1
.gitignore vendored
View File

@ -3,4 +3,3 @@ cache/
tests/ tests/
minelife.html minelife.html
vendors/keygen/__pycache__ vendors/keygen/__pycache__
erreurs/

View File

@ -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;

View File

@ -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);

View File

@ -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) {

View File

@ -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>';