-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMessage_Arrived.prf.xml
117 lines (116 loc) · 3.16 KB
/
Message_Arrived.prf.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<TaskerData sr="" dvi="1" tv="5.9.2">
<Profile sr="prof2" ve="2">
<cdate>1575748963495</cdate>
<clp>true</clp>
<edate>1589993153822</edate>
<id>2</id>
<mid0>3</mid0>
<nme>Message Arrived</nme>
<Event sr="con0" ve="2">
<code>7</code>
<pri>0</pri>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
</Event>
</Profile>
<Task sr="task3">
<cdate>1575748969418</cdate>
<edate>1589993014950</edate>
<id>3</id>
<nme>Telegram</nme>
<pri>6</pri>
<Action sr="act0" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">New text received.</Str>
<Str sr="arg1" ve="3">com.google.android.tts:eng-usa</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="1"/>
</Action>
<Action sr="act1" ve="7">
<code>129</code>
<Str sr="arg0" ve="3">var from = global('SMSRF')
var from_name = global('SMSRB')
var subject = global('MMSRS')
var body = global('SMSRB')
var obj = { chat_id: YOUR-CHAT-ID, text:`From: ${from} ${from_name}
Subject: ${subject}
${body}`}
var ansjson= JSON.stringify(obj)</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="45"/>
</Action>
<Action sr="act2" ve="7">
<code>116</code>
<Str sr="arg0" ve="3">https://api.telegram.org:443</Str>
<Str sr="arg1" ve="3">/botYOUR-BOT-TOKEN/sendMessage</Str>
<Str sr="arg2" ve="3">%ansjson</Str>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="10"/>
<Str sr="arg6" ve="3">application/json</Str>
<Str sr="arg7" ve="3"/>
<Int sr="arg8" val="0"/>
</Action>
<Action sr="act3" ve="7">
<code>129</code>
<Str sr="arg0" ve="3">var parse = JSON.parse(global('HTTPD'))
var is_ok = parse.ok
var descript = parse.description</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="45"/>
</Action>
<Action sr="act4" ve="7">
<code>550</code>
<Str sr="arg0" ve="3">%is_ok</Str>
<Str sr="arg1" ve="3">%descript</Str>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3">Popup</Str>
<Int sr="arg4" val="3"/>
<Int sr="arg5" val="1"/>
</Action>
<Action sr="act5" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">Sent successfully</Str>
<Str sr="arg1" ve="3">com.google.android.tts:eng-usa</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%is_ok</lhs>
<op>0</op>
<rhs>true</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act6" ve="7">
<code>559</code>
<Str sr="arg0" ve="3">Sent failed</Str>
<Str sr="arg1" ve="3">com.google.android.tts:eng-usa</Str>
<Int sr="arg2" val="3"/>
<Int sr="arg3" val="5"/>
<Int sr="arg4" val="5"/>
<Int sr="arg5" val="1"/>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%is_ok</lhs>
<op>1</op>
<rhs>true</rhs>
</Condition>
</ConditionList>
</Action>
</Task>
</TaskerData>