summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2022-04-06 17:47:26 -0700
committerTrumeet <yuuta@yuuta.moe>2022-04-06 17:47:26 -0700
commit7eabc7668bc0fddf9b1e5659d0b02b5a33227ef0 (patch)
treeb1dc54f140c50dd372295842f07523cfe255e593
parent81285b681bfa479a5c3c5c73707724b48bd2944b (diff)
downloadksyxbot-7eabc7668bc0fddf9b1e5659d0b02b5a33227ef0.tar
ksyxbot-7eabc7668bc0fddf9b1e5659d0b02b5a33227ef0.tar.gz
ksyxbot-7eabc7668bc0fddf9b1e5659d0b02b5a33227ef0.tar.bz2
ksyxbot-7eabc7668bc0fddf9b1e5659d0b02b5a33227ef0.zip
Support forwarding from channels with prof. signature
-rw-r--r--store.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/store.c b/store.c
index 4bc2d8e..17acc74 100644
--- a/store.c
+++ b/store.c
@@ -86,8 +86,10 @@ static bool filter(struct TdMessage *msg) {
struct TdMessageForwardOriginChannel *chan =
(struct TdMessageForwardOriginChannel *) origin;
if (chan->chat_id_ != -1001304761546 &&
- chan->chat_id_ != -1001565681839)
- return false;
+ chan->chat_id_ != -1001565681839) {
+ if (!chan->author_signature_ ||
+ strcmp(chan->author_signature_, "ksyx") != 0) return false;
+ }
break;
}
case CODE_MessageForwardOriginHiddenUser: {