@@ 216-223 (lines=8) @@ | ||
213 | // conditionally add data from other tables depending on message |
|
214 | // type |
|
215 | switch ($messageType) { |
|
216 | case ThreemaGateway_Model_Messages::TYPE_DELIVERY_MESSAGE: |
|
217 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_MESSAGES . '_delivery_receipt'] = [ |
|
218 | 'message_id' => $messageId |
|
219 | ]; |
|
220 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_DELIVERY_RECEIPT] = [ |
|
221 | 'message_id' => $messageId |
|
222 | ]; |
|
223 | break; |
|
224 | ||
225 | case ThreemaGateway_Model_Messages::TYPE_FILE_MESSAGE: |
|
226 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_MESSAGES . '_file'] = [ |
|
@@ 225-232 (lines=8) @@ | ||
222 | ]; |
|
223 | break; |
|
224 | ||
225 | case ThreemaGateway_Model_Messages::TYPE_FILE_MESSAGE: |
|
226 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_MESSAGES . '_file'] = [ |
|
227 | 'message_id' => $messageId |
|
228 | ]; |
|
229 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_FILES] = [ |
|
230 | 'message_id' => $messageId |
|
231 | ]; |
|
232 | break; |
|
233 | ||
234 | case ThreemaGateway_Model_Messages::TYPE_IMAGE_MESSAGE: |
|
235 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_MESSAGES . '_image'] = [ |
|
@@ 234-241 (lines=8) @@ | ||
231 | ]; |
|
232 | break; |
|
233 | ||
234 | case ThreemaGateway_Model_Messages::TYPE_IMAGE_MESSAGE: |
|
235 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_MESSAGES . '_image'] = [ |
|
236 | 'message_id' => $messageId |
|
237 | ]; |
|
238 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_FILES] = [ |
|
239 | 'message_id' => $messageId |
|
240 | ]; |
|
241 | break; |
|
242 | ||
243 | case ThreemaGateway_Model_Messages::TYPE_TEXT_MESSAGE: |
|
244 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_MESSAGES . '_text'] = [ |
|
@@ 243-250 (lines=8) @@ | ||
240 | ]; |
|
241 | break; |
|
242 | ||
243 | case ThreemaGateway_Model_Messages::TYPE_TEXT_MESSAGE: |
|
244 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_MESSAGES . '_text'] = [ |
|
245 | 'message_id' => $messageId |
|
246 | ]; |
|
247 | $existing[ThreemaGateway_Model_Messages::DB_TABLE_FILES] = [ |
|
248 | 'message_id' => $messageId |
|
249 | ]; |
|
250 | break; |
|
251 | ||
252 | default: |
|
253 | throw new XenForo_Exception(new XenForo_Phrase('threemagw_unknown_message_type')); |