Skip to content

Commit

Permalink
Remove leading @ from twitter handles
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveRandom committed Feb 14, 2017
1 parent 6770987 commit f7c19c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Chat/Entities/MainSiteUser.php
Expand Up @@ -26,10 +26,10 @@ public static function createFromDOMDocument(\DOMDocument $doc): MainSiteUser //

$twitterLink = $xpath->query("//li[span[" . xpath_html_class('icon-twitter') . "]]/a");
$twitterHandle = $twitterLink->length > 0
? trim($twitterLink->item(0)->textContent)
? ltrim(trim($twitterLink->item(0)->textContent), '@')
: null;

// cannot separate this because of static, bloody mancs.
// cannot separate this because of static, bloody mancs.
$githubLink = $xpath->query("//li[span[" . xpath_html_class('icon-github') . "]]/a");
$githubUsername = $githubLink->length > 0
? trim($githubLink->item(0)->textContent)
Expand Down

0 comments on commit f7c19c1

Please sign in to comment.