GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
* [PATCH pit v1 0/1] Fix tgMsgIdLookup() argument
@ 2022-02-27 19:08 Alviro Iskandar Setiawan
  2022-02-27 19:08 ` [PATCH pit v1 1/1] bin/public-inbox-tg: " Alviro Iskandar Setiawan
  2022-02-27 20:04 ` [PATCH pit v1 0/1] " Ammar Faizi
  0 siblings, 2 replies; 3+ messages in thread
From: Alviro Iskandar Setiawan @ 2022-02-27 19:08 UTC (permalink / raw)
  To: Ammar Faizi
  Cc: GNU/Weeb Mailing List, Alviro Iskandar Setiawan,
	Alviro Iskandar Setiawan

Hi sir,

The last patchset I sent here has a bug
https://t.me/GNUWeeb/544194

Please take single patch to fix it.

Fix tgMsgIdLookup() argument.

The argument to tgMsgIdLookup() was wrong, it should be $inReplyTo,
not $msgId, because that's the message we're replying to.

Fixes: 2d8a719c4c724018c6389bdda8796587ca01145b ("bin/public-inbox-tg: Reflect the replied message on Telegram")

Cc: @Ryne4S
Cc: @ammarfaizi2
Cc: @rlapz
Cc: @LoliOverflow
Cc: @VocaLoli
Cc: @lappretard
Cc: @rwaldi
Signed-off-by: Alviro Iskandar Setiawan <[email protected]>
---

Alviro Iskandar Setiawan (1):
  bin/public-inbox-tg: Fix tgMsgIdLookup() argument

 bin/public-inbox-tg.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 2d8a719c4c724018c6389bdda8796587ca01145b
-- 
2.32.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH pit v1 1/1] bin/public-inbox-tg: Fix tgMsgIdLookup() argument
  2022-02-27 19:08 [PATCH pit v1 0/1] Fix tgMsgIdLookup() argument Alviro Iskandar Setiawan
@ 2022-02-27 19:08 ` Alviro Iskandar Setiawan
  2022-02-27 20:04 ` [PATCH pit v1 0/1] " Ammar Faizi
  1 sibling, 0 replies; 3+ messages in thread
From: Alviro Iskandar Setiawan @ 2022-02-27 19:08 UTC (permalink / raw)
  To: Ammar Faizi
  Cc: GNU/Weeb Mailing List, Alviro Iskandar Setiawan,
	Alviro Iskandar Setiawan

The argument to tgMsgIdLookup() was wrong, it should be $inReplyTo,
not $msgId, because that's the message we're going to reply.

Fixes: 2d8a719c4c724018c6389bdda8796587ca01145b ("bin/public-inbox-tg: Reflect the replied message on Telegram")
Signed-off-by: Alviro Iskandar Setiawan <[email protected]>
---
 bin/public-inbox-tg.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/public-inbox-tg.php b/bin/public-inbox-tg.php
index a453ad5..b6b8491 100644
--- a/bin/public-inbox-tg.php
+++ b/bin/public-inbox-tg.php
@@ -210,7 +210,7 @@ function fx(string $input): int
 		]
 	];
 
-	$replyToTgMsgId = $inReplyTo ? tgMsgIdLookup($msgId) : 0;
+	$replyToTgMsgId = $inReplyTo ? tgMsgIdLookup($inReplyTo) : 0;
 
 	if (preg_match("/\[.*(?:patch|rfc).*?(?:(\d+)\/(\d+))?\](.+)/i", $subject, $m) &&
 	    preg_match("/diff --git/", $body)) {
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH pit v1 0/1] Fix tgMsgIdLookup() argument
  2022-02-27 19:08 [PATCH pit v1 0/1] Fix tgMsgIdLookup() argument Alviro Iskandar Setiawan
  2022-02-27 19:08 ` [PATCH pit v1 1/1] bin/public-inbox-tg: " Alviro Iskandar Setiawan
@ 2022-02-27 20:04 ` Ammar Faizi
  1 sibling, 0 replies; 3+ messages in thread
From: Ammar Faizi @ 2022-02-27 20:04 UTC (permalink / raw)
  To: Alviro Iskandar Setiawan; +Cc: GNU/Weeb Mailing List, Alviro Iskandar Setiawan

On 2/28/22 2:08 AM, Alviro Iskandar Setiawan wrote:
> Please take single patch to fix it.
> 
> Fix tgMsgIdLookup() argument.
> 
> The argument to tgMsgIdLookup() was wrong, it should be $inReplyTo,
> not $msgId, because that's the message we're replying to.

Applied, thanks!

-- 
Ammar Faizi


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-27 20:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-27 19:08 [PATCH pit v1 0/1] Fix tgMsgIdLookup() argument Alviro Iskandar Setiawan
2022-02-27 19:08 ` [PATCH pit v1 1/1] bin/public-inbox-tg: " Alviro Iskandar Setiawan
2022-02-27 20:04 ` [PATCH pit v1 0/1] " Ammar Faizi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox