CodeTheCity / city-consult

Chatbot project to guide citizens through Civic Consultations
MIT License
2 stars 0 forks source link

Compress Multiple Messages #4

Open gavbarnett opened 7 years ago

gavbarnett commented 7 years ago

When the bot response with multiple replies in a short time without human input the interface should gracefully merge these messages, with line returns, into one speech bubble.

Similar to what the Facebook messenger app does.

i.e. sudo code:

//On new msg arriving:
if (msg_type = "from_bot"){
   if (last_msg_type = "from_bot"){
      merge_with_previous_speech_bubble(msg);
   }else{
      new speech_bubble(msg);
   }
}
last_msg_type = msg_type;
creamylooks commented 7 years ago

Hi All,

Gavin, i'll look into that over the weekend. The reason i didn't do that was because of the way the code is structured. But i should get that sorted this weekend hopefully.

Thanks Adam. We should be looking to create a collection to handle all possible questions so the questions come from there istead of hard coding.

Thanks.

Kind Regards, MALICK Farouk.

Sent from my Samsung device

-------- Original message -------- From: Gavin Barnett notifications@github.com Date: 2017-03-14 12:54 PM (GMT+00:00) To: CodeTheCity/city-consult city-consult@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [CodeTheCity/city-consult] Compress Multiple Messages (#4)

When the bot response with multiple replies in a short time without human input the interface should gracefully merge these messages, with line returns, into one speech bubble.

Similar to what the Facebook messenger app does.

i.e. sudo code:

//On new msg arriving: if (msg_type = "from_bot"){ if (last_msg_type = "from_bot"){ merge_with_previous_speech_bubble(msg); }else{ new speech_bubble(msg); } } last_msg_type = msg_type;

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/CodeTheCity/city-consult/issues/4, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQWK6IDXuo7Pai0qZISOz1t_ARZ-Du60ks5rlo3dgaJpZM4MciFd.


This email has been scanned for spam and viruses by Proofpoint Essentials. Click herehttps://eu1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=1489496047-HGLPqx4CriE7&r_address=f.o.malick%40rgu.ac.uk&report=1 to report this email as spam.

Robert Gordon University is the top university for graduate jobs in the UK (HESA 2013 & 2014) Please consider the environment before printing this email Please consider the environment before printing this email Robert Gordon University is the top university for graduate jobs in the UK (HESA 2013 & 2014) Robert Gordon University, a Scottish charity registered under charity number SC 013781. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Robert Gordon University. Thank you.