ping-a-human 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -104,9 +104,14 @@ export class TelegramChannel {
|
|
|
104
104
|
respondent: this.respondentFrom(msg.from),
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
// Inline-button tap.
|
|
107
|
+
// Inline-button tap. Note: a callback_query's `message` is the bot's
|
|
108
|
+
// OWN question (the message the buttons are attached to), so its
|
|
109
|
+
// message_id equals the question's id — applying the isStale anchor
|
|
110
|
+
// here would wrongly drop every tap (id <= sinceRef) and leave the
|
|
111
|
+
// human's spinner loading forever. Taps are inherently post-question
|
|
112
|
+
// (the button only exists on a message we just sent), so accept them.
|
|
108
113
|
const cb = update.callback_query;
|
|
109
|
-
if (cb
|
|
114
|
+
if (cb) {
|
|
110
115
|
// Best-effort: clear the client's loading spinner.
|
|
111
116
|
try {
|
|
112
117
|
await this.api("answerCallbackQuery", { callback_query_id: cb.id });
|
package/package.json
CHANGED