Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
nodeloc committed Jan 20, 2024
1 parent c2ee836 commit 36cc6c0
Show file tree
Hide file tree
Showing 23 changed files with 150 additions and 4,990 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) Dexif and Flagrow
Copyright (c) Nodeloc and Flagrow

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# Telegram login and notifications by Dexif (rewritten original extension of [Flagrow](https://discuss.flarum.org/d/1832-flagrow-extension-developer-group))
# Telegram login and notifications by Nodeloc (rewritten original extension of [Flagrow](https://discuss.flarum.org/d/1832-flagrow-extension-developer-group))

[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/dexif/telegram/blob/master/LICENSE.md) [![Latest Stable Version](https://img.shields.io/packagist/v/dexif/telegram.svg)](https://packagist.org/packages/dexif/telegram) [![Total Downloads](https://img.shields.io/packagist/dt/dexif/telegram.svg)](https://packagist.org/packages/dexif/telegram)
[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nodeloc/telegram/blob/master/LICENSE.md) [![Latest Stable Version](https://img.shields.io/packagist/v/nodeloc/telegram.svg)](https://packagist.org/packages/nodeloc/telegram) [![Total Downloads](https://img.shields.io/packagist/dt/nodeloc/telegram.svg)](https://packagist.org/packages/nodeloc/telegram)

This extension adds a "Log in with Telegram" button that uses the new [Telegram Login widget](https://telegram.org/blog/login) and add an option to receive notifications via Telegram as well.

## Installation

Use [Bazaar](https://discuss.flarum.org/d/5151-flagrow-bazaar-the-extension-marketplace) or install manually:

```bash
composer require dexif/telegram
composer require nodeloc/telegram
```

## Updating

```bash
composer update dexif/telegram
composer update nodeloc/telegram
php flarum migrate
php flarum cache:clear
```
Expand All @@ -40,8 +38,8 @@ Please include as many details as possible. You can use `php flarum info` to get

## Links

- [Flarum Discuss post](https://discuss.flarum.org/d/9033-telegram-login-and-notifications-by-flagrow)
- [Source code on GitHub](https://github.com/dexif/telegram)
- [Report an issue](https://github.com/dexif/telegram/issues)
- [Download via Packagist](https://packagist.org/packages/dexif/telegram)
- [Flarum Discuss post](https://www.nodeloc.com)
- [Source code on GitHub](https://github.com/nodeloc/telegram)
- [Report an issue](https://github.com/nodeloc/telegram/issues)
- [Download via Packagist](https://packagist.org/packages/nodeloc/telegram)

22 changes: 14 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "dexif/telegram",
"name": "nodeloc/telegram",
"description": "Telegram login and notifications for Flarum",
"keywords": [
"extension",
"flarum",
"dexif",
"nodeloc",
"telegram",
"auth",
"notifications"
Expand All @@ -21,14 +21,20 @@
"name": "Evgenij Spitsyn",
"email": "evgeniy@spitsyn.net",
"homepage": "https://spitsyn.net/"
},
{
"name": "JameSupeReal",
"email": "james@nodeloc.com",
"homepage": "https://www.nodeloc.com/"
}
],
"support": {
"issues": "https://github.com/dexif/telegram/issues",
"source": "https://github.com/dexif/telegram"
"issues": "https://github.com/nodeloc/telegram/issues",
"source": "https://github.com/nodeloc/telegram"
},
"require": {
"flarum/core": "^0.1.0-beta.10"
"flarum/core": "^1.8.0",
"irazasyed/telegram-bot-sdk": "^3.9"
},
"extra": {
"flarum-extension": {
Expand All @@ -39,13 +45,13 @@
"color": "#5f4bb6"
}
},
"dexif": {
"discuss": "https://discuss.flarum.org/d/9033-telegram-login-and-notifications-by-dexif"
"nodeloc": {
"discuss": "https://www.nodeloc.com"
}
},
"autoload": {
"psr-4": {
"Dexif\\Telegram\\": "src/"
"Nodeloc\\Telegram\\": "src/"
}
}
}
18 changes: 8 additions & 10 deletions extend.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Dexif\Telegram;
use Dexif\Telegram\Controllers\TelegramAuthController;
use Dexif\Telegram\Controllers\TelegramBotController;
namespace Nodeloc\Telegram;
use Nodeloc\Telegram\Controllers\TelegramAuthController;
use Nodeloc\Telegram\Controllers\TelegramBotController;
use Flarum\Extend;

use Illuminate\Contracts\Events\Dispatcher;
Expand All @@ -15,13 +15,11 @@
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/resources/less/forum.less'),
(new Extend\Locales(__DIR__ . '/resources/locale')),
function (Dispatcher $events, Factory $view) {
$events->listen(Serializing::class, Listeners\AddUserAttributes::class);
$events->subscribe(Listeners\SendTelegramNotifications::class);
$events->subscribe(Listeners\EnableTelegramNotifications::class);
$events->subscribe(Listeners\InjectSettings::class);

},
(new Extend\Event)
->listen(Serializing::class, Listeners\AddUserAttributes::class)
->subscribe(Listeners\SendTelegramNotifications::class)
->subscribe(Listeners\EnableTelegramNotifications::class)
->subscribe(Listeners\InjectSettings::class),
(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js'),

Expand Down
2 changes: 1 addition & 1 deletion js/dist/admin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 36cc6c0

Please sign in to comment.