1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-05 19:42:04 +02:00

Remove fixed folder name.

This commit is contained in:
B. Petersen 2016-07-21 12:44:50 +02:00
parent cb278782b9
commit 1ff46d1ce9
3 changed files with 11 additions and 6 deletions

View file

@ -168,12 +168,12 @@ void MrImap::FetchSingleMsg(MrImapThreadVal& threadval, uint32_t uid)
}
void MrImap::FetchMessages(MrImapThreadVal& threadval)
void MrImap::FetchFromFolder(MrImapThreadVal& threadval, const char* folder)
{
// select the folder
int r = mailimap_select(threadval.m_imap, "INBOX");
int r = mailimap_select(threadval.m_imap, folder);
if( Mr_is_error(r) ) {
MrLogError("could not select INBOX.");
MrLogError("could not select folder.", folder);
return;
}
@ -266,7 +266,7 @@ void MrImap::WorkingThread()
switch( cmd )
{
case MR_THREAD_FETCH:
FetchMessages(threadval);
FetchFromFolder(threadval, "INBOX");
break;
case MR_THREAD_EXIT:

View file

@ -81,7 +81,7 @@ private:
static void StartupHelper (MrImap*);
void WorkingThread ();
void FetchMessages (MrImapThreadVal&);
void FetchFromFolder (MrImapThreadVal&, const char* folder);
void FetchSingleMsg (MrImapThreadVal&, uint32_t uid);
};

View file

@ -264,8 +264,13 @@ int32_t MrImfParser::Imf2Msg(uint32_t server_id, const char* imf_raw, size_t imf
}
}
// check, if the given message can be used as chat
// (a message that is send by us introduces a chat with the receiver)
// TODO
// add new message record to database
// (MrImap checks that the record does not yet exist using ServerIdExists() before calling Imf2Msg())
// (MrImap checks that the record does not yet exist using ServerIdExists() before calling Imf2Msg())
s = m_mailbox->m_sql.m_pd[INSERT_INTO_msg_scm];
sqlite3_reset(s);
sqlite3_bind_int (s, 1, server_id);