|
@ -210,15 +210,16 @@ class ParticipantRepo {
|
|
|
* @param handler
|
|
|
*/
|
|
|
static saveParticipantsToMysql(sessionId, users, handler) {
|
|
|
let sql = "INSERT INTO " + DB_TABLES.Participants + " (session_id,participant_id,participant_role) VALUES ";
|
|
|
let sql = "INSERT INTO " + DB_TABLES.Participants + " (session_id,participant_id,participant_role,last_fetch_time) VALUES ";
|
|
|
let args = [];
|
|
|
for (let j in users) {
|
|
|
let tokens = users[j].split(":");
|
|
|
if(tokens.length > 1&&tokens[1]==2)continue;
|
|
|
sql += "(?,?,?)";
|
|
|
sql += "(?,?,?,?)";
|
|
|
args.push(sessionId);
|
|
|
args.push(tokens[0]);
|
|
|
args.push(tokens.length > 1 ? tokens[1] : '0');
|
|
|
args.push(new Date());
|
|
|
if (j != users.length - 1) sql += ", ";
|
|
|
}
|
|
|
|