@@ -136,15 +136,15 @@ function ($x) {
136
136
$ response = $ client ->request ('GET ' , $ url );
137
137
}
138
138
139
- $ code = $ response ->getStatusCode ();
139
+ $ code = $ response ->getStatusCode ();
140
140
141
141
142
142
$ body = $ response ->getBody ();
143
143
144
144
$ conversation ->setMeta ("List-Unsubscribe-Submitted " , ["status " => $ response ->getStatusCode (), "reason " => $ response ->getReasonPhrase ()]);
145
145
146
146
$ auth_user = auth ()->user ();
147
- error_log ($ auth_user );
147
+ error_log ($ auth_user );
148
148
$ created_by_user_id = (gettype ($ auth_user ) == "object " ) ? $ auth_user ->id : $ auth_user ;
149
149
\App \Thread::create (
150
150
$ conversation , Thread::TYPE_LINEITEM ,
@@ -163,10 +163,10 @@ function ($x) {
163
163
]
164
164
);
165
165
166
- if ($ code >=200 && $ code <=299 ) {
167
- $ conversation ->changeStatus (Conversation::STATUS_CLOSED ,$ auth_user , false );
168
- }
169
-
166
+ if ($ code >=200 && $ code <=299 ) {
167
+ $ conversation ->changeStatus (Conversation::STATUS_CLOSED , $ auth_user , false );
168
+ }
169
+
170
170
} catch (ConnectException $ e ) {
171
171
172
172
$ auth_user = auth ()->user ();
@@ -185,10 +185,10 @@ function ($x) {
185
185
'code ' => 501 ,
186
186
'message ' => "Sorry, something went wrong: " . $ e ->getMessage (),
187
187
'lineNumber ' => $ e ->getLine (),
188
- 'trace ' =>$ e ->getTraceAsString (),
189
- 'method ' => ($ unsubPost ) ? 'POST ' : "GET " ,
190
- 'url ' => $ url ,
191
- 'opts ' => $ opts ,
188
+ 'trace ' =>$ e ->getTraceAsString (),
189
+ 'method ' => ($ unsubPost ) ? 'POST ' : "GET " ,
190
+ 'url ' => $ url ,
191
+ 'opts ' => $ opts ,
192
192
]
193
193
]
194
194
);
@@ -210,11 +210,11 @@ function ($x) {
210
210
'code ' => 501 ,
211
211
'message ' => "Sorry, something went wrong: " . $ e ->getMessage (),
212
212
'lineNumber ' => $ e ->getLine (),
213
- 'trace ' =>$ e ->getTraceAsString (),
214
- 'method ' => ($ unsubPost ) ? 'POST ' : "GET " ,
215
- 'user ' => json_encode ($ auth_user ),
216
- 'url ' => $ url ,
217
- 'opts ' => $ opts ,
213
+ 'trace ' =>$ e ->getTraceAsString (),
214
+ 'method ' => ($ unsubPost ) ? 'POST ' : "GET " ,
215
+ 'user ' => json_encode ($ auth_user ),
216
+ 'url ' => $ url ,
217
+ 'opts ' => $ opts ,
218
218
]
219
219
]
220
220
);
0 commit comments