Added folder to select statement & changed received to receivedTime #240

Merged
acejam merged 3 commits from master into master 2013-06-25 05:56:58 +02:00
acejam commented 2013-06-21 07:02:33 +02:00 (Migrated from github.com)
  • Added folder to select statement for getInboxMessagesByAddress. When selecting messages for a specific address, only the messages within the true inbox should be returned. Currently there is an "inbox" table, but that table also has a folder column, with can contain a value of "inbox". Perhaps the folder column should be removed.
  • Changed received to receivedTime. The time was not being returned properly.
- Added folder to select statement for getInboxMessagesByAddress. When selecting messages for a specific address, only the messages within the _true_ inbox should be returned. Currently there is an "inbox" table, but that table also has a folder column, with can contain a value of "inbox". Perhaps the folder column should be removed. - Changed received to receivedTime. The time was not being returned properly.
DivineOmega commented 2013-06-21 10:20:01 +02:00 (Migrated from github.com)

The folder column is currently used to determine whether the message is trashed or not. Trashed messages have the folder column set to 'trash', while regular inbox messages are set to 'inbox'.

The folder column is currently used to determine whether the message is trashed or not. Trashed messages have the folder column set to 'trash', while regular inbox messages are set to 'inbox'.
acejam commented 2013-06-21 17:59:22 +02:00 (Migrated from github.com)

What about sent messages though? It looks like the same issue happens with sent items. Instead of having both a sent table, and a sent column/value, there should be standardization. If a message is in your Inbox, it should be represented as a row in the Inbox table. If that message gets deleted, then the row should be deleted from the Inbox table and moved to the "trash" table. Otherwise to get the true representation of an inbox, you need to set "FROM='inbox' WHERE folder='inbox'" in any queries used.

What about sent messages though? It looks like the same issue happens with sent items. Instead of having both a sent table, and a sent column/value, there should be standardization. If a message is in your Inbox, it should be represented as a row in the Inbox table. If that message gets deleted, then the row should be deleted from the Inbox table and moved to the "trash" table. Otherwise to get the true representation of an inbox, you need to set "FROM='inbox' WHERE folder='inbox'" in any queries used.
Atheros1 commented 2013-06-21 18:57:01 +02:00 (Migrated from github.com)

@acejam The inbox and sent tables have different fields. Also, if folders are ever implemented in this UI, having this folder field would be necessary: we can't have a different table for ever folder the user might create. Queries like the one used here could be changed to something like:

...and folder !='trash'
@acejam The inbox and sent tables have different fields. Also, if folders are ever implemented in this UI, having this folder field would be necessary: we can't have a different table for ever folder the user might create. Queries like the one used here could be changed to something like: ``` ...and folder !='trash' ```
acejam commented 2013-06-22 08:24:52 +02:00 (Migrated from github.com)

@DivineOmega @Atheros1 I see what you mean now, thanks for the explanations. I have added another method (getSentMessagesByAddress) and have included the necessary folder selection within the DB query.

@DivineOmega @Atheros1 I see what you mean now, thanks for the explanations. I have added another method (getSentMessagesByAddress) and have included the necessary folder selection within the DB query.
Atheros1 commented 2013-06-25 05:57:09 +02:00 (Migrated from github.com)

Thank you acejam

Thank you acejam
This repo is archived. You cannot comment on pull requests.
No description provided.