@@ -124,34 +124,21 @@ protected function dispatch($request)
124
124
Constants::REQUESTS_PATH . $ request ->id . Constants::APPROVE_SUFFIX ,
125
125
json_encode (['template_id ' => $ msg ->templateid ])
126
126
);
127
- try {
128
- $ request ->conversation ()->addMessage ('Activated using template ' . $ msg ->templateid );
129
- } catch (\Exception $ e ) {
130
- $ this ->logger ->error (Constants::GENERIC_CONVERSATION_ERROR_MESSAGE . $ request ->id );
131
- }
132
127
$ processingResult = 'succeed (Activated using template ' . $ msg ->templateid . ') ' ;
133
128
} else {
134
129
$ this ->fulfillment ->sendRequest (
135
130
'POST ' ,
136
131
Constants::REQUESTS_PATH . $ request ->id . Constants::APPROVE_SUFFIX ,
137
132
json_encode (['activation_tile ' => $ msg ->activationTile ])
138
133
);
139
- try {
140
- $ request ->conversation ()->addMessage ('Activated using Custom ActivationTile ' );
141
- } catch (GuzzleException $ e ) {
142
- $ this ->logger ->error (Constants::GENERIC_CONVERSATION_ERROR_MESSAGE . $ request ->id );
143
- }
134
+
144
135
$ processingResult = 'succeed ( ' . $ msg ->activationTile . ') ' ;
145
136
}
146
137
} catch (Inquire $ e ) {
147
138
// update parameters and move to inquire
148
139
$ this ->fulfillment ->updateParameters ($ request , $ e ->params );
149
140
$ this ->fulfillment ->sendRequest ('POST ' , Constants::REQUESTS_PATH . $ request ->id . Constants::INQUIRE_SUFFIX , ($ e ->templateId != null ) ? json_encode (['template_id ' => $ msg ->templateId ]) : '{} ' );
150
- try {
151
- $ request ->conversation ()->addMessage ($ e ->getMessage ());
152
- } catch (GuzzleException $ e ) {
153
- $ this ->logger ->error (Constants::GENERIC_CONVERSATION_ERROR_MESSAGE . $ request ->id );
154
- }
141
+
155
142
$ processingResult = 'inquire ' ;
156
143
} catch (Fail $ e ) {
157
144
// fail request
@@ -160,11 +147,6 @@ protected function dispatch($request)
160
147
Constants::REQUESTS_PATH . $ request ->id . Constants::FAIL_SUFFIX ,
161
148
json_encode (['reason ' => $ e ->getMessage ()])
162
149
);
163
- try {
164
- $ request ->conversation ()->addMessage ($ e ->getMessage ());
165
- } catch (\Exception $ e ) {
166
- $ this ->logger ->error (Constants::GENERIC_CONVERSATION_ERROR_MESSAGE . $ request ->id );
167
- }
168
150
$ processingResult = 'fail ' ;
169
151
} catch (Skip $ e ) {
170
152
try {
0 commit comments