summaryrefslogtreecommitdiffstats
path: root/lib/Service
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-01-06 12:18:23 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-02-05 15:10:24 -0100
commit6f3f8fb86dcd42ac4288b0c9c505e98295cfe4a0 (patch)
tree5207f83c4dd72e8f15ee85fbb470207c0db89a9a /lib/Service
parent833d19617b8fc15baf651b280b3b3be71d935ba2 (diff)
add # if missing
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/HashtagService.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Service/HashtagService.php b/lib/Service/HashtagService.php
index 59bb551a..cf1b8e7e 100644
--- a/lib/Service/HashtagService.php
+++ b/lib/Service/HashtagService.php
@@ -130,6 +130,10 @@ class HashtagService {
* @throws HashtagDoesNotExistException
*/
public function getHashtag(string $hashtag): array {
+ if (substr($hashtag, 0, 1) !== '#') {
+ $hashtag = '#' . $hashtag;
+ }
+
return $this->hashtagsRequest->getHashtag($hashtag);
}