Skip to content

Commit

Permalink
Fix PHP warning when not using message thread ID (#46)
Browse files Browse the repository at this point in the history
* Update wptelegram-bot-api

* Fix PHP warning when not using message thread ID

* Prepare for v3.1.15

Co-authored-by: irshadahmad21 <[email protected]>
  • Loading branch information
irshadahmad21 and irshadahmad21 authored Jan 5, 2023
1 parent b3248bc commit f5bc9ac
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**Requires at least:** 5.8
**Requires PHP:** 7.0
**Tested up to:** 6.1.1
**Stable tag:** 3.1.14
**Stable tag:** 3.1.15
**License:** GPLv2 or later
**License URI:** [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)

Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project are documented in this file.

## Unreleased

## [3.1.15 - 2023-01-5](https://github.com/wpsocio/wptelegram/releases/tag/v3.1.15)

### Bug fixes

- Fixed PHP warning when not using message thread ID

## [3.1.14 - 2022-12-8](https://github.com/wpsocio/wptelegram/releases/tag/v3.1.14)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wptelegram/core",
"version": "3.1.14",
"version": "3.1.15",
"description": "Integrate your WordPress site perfectly with Telegram with full control.",
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "*",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "wptelegram",
"title": "WP Telegram",
"version": "3.1.14",
"version": "3.1.15",
"description": "Integrate your WordPress site perfectly with Telegram with full control.",
"repository": {
"type": "git",
Expand Down
5 changes: 4 additions & 1 deletion src/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: telegram, notifications, posts, channel, group
Requires at least: 5.8
Tested up to: 6.1.1
Requires PHP: 7.0
Stable tag: 3.1.14
Stable tag: 3.1.15
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -205,6 +205,9 @@ Yes, all you need to do is to setup **Private Notifications** module and use the

== Changelog ==

= 3.1.15 =
- Fixed PHP warning when not using message thread ID

= 3.1.14 =
- Added support for sending messages to topics with groups
- Fixed messages not sent when replied-to message is not found
Expand Down
6 changes: 6 additions & 0 deletions src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project are documented in this file.

## Unreleased

## [3.1.15 - 2023-01-5](https://github.com/wpsocio/wptelegram/releases/tag/v3.1.15)

### Bug fixes

- Fixed PHP warning when not using message thread ID

## [3.1.14 - 2022-12-8](https://github.com/wpsocio/wptelegram/releases/tag/v3.1.14)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion src/includes/wptelegram-bot-api
6 changes: 3 additions & 3 deletions src/languages/wptelegram.pot
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Copyright (C) 2022
# Copyright (C) 2023
# This file is distributed under the same license as the package.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/wpsocio/wptelegram\n"
"POT-Creation-Date: 2022-12-08 11:44:38+00:00\n"
"POT-Creation-Date: 2023-01-05 12:53:18+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2022-12-8 11:440\n"
"PO-Revision-Date: 2023-01-5 12:530\n"
"Last-Translator: WP Telegram\n"
"Language-Team: WP Telegram\n"
"Language: en_US\n"
Expand Down
2 changes: 1 addition & 1 deletion src/modules/p2tg/PostSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,7 @@ private function send_responses() {
$params = reset( $response );
$method = key( $response );

list( $params['chat_id'], $params['message_thread_id'] ) = explode( ':', $channel );
list( $params['chat_id'], $params['message_thread_id'] ) = array_pad( explode( ':', $channel ), 2, '' );

if ( ! $params['message_thread_id'] ) {
unset( $params['message_thread_id'] );
Expand Down
4 changes: 2 additions & 2 deletions src/wptelegram.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: WP Telegram
* Plugin URI: https://t.me/WPTelegram
* Description: Integrate your WordPress website perfectly with Telegram. Send posts automatically to Telegram when published or updated, whether to a Telegram Channel, Group or private chat, with full control. Get your email notifications on Telegram.
* Version: 3.1.14
* Version: 3.1.15
* Author: WP Socio
* Author URI: https://wpsocio.com
* License: GPL-2.0+
Expand All @@ -24,7 +24,7 @@
die;
}

define( 'WPTELEGRAM_VER', '3.1.14' );
define( 'WPTELEGRAM_VER', '3.1.15' );

defined( 'WPTELEGRAM_BASENAME' ) || define( 'WPTELEGRAM_BASENAME', plugin_basename( __FILE__ ) );

Expand Down

0 comments on commit f5bc9ac

Please sign in to comment.