esl / MongooseIM

MongooseIM is Erlang Solutions' robust, scalable and efficient XMPP server, aimed at large installations. Specifically designed for enterprise purposes, it is fault-tolerant and can utilise the resources of multiple clustered machines.
Other
1.64k stars 420 forks source link

Chat history is not working properly. #4269

Open fluttercid opened 2 weeks ago

fluttercid commented 2 weeks ago

MongooseIM version: 6.1.0 Installed from: Helm chart image Erlang/OTP version: N/A

Hello. I am using bosh from web client and there are two issues now.

  1. When a user re-login (refresh page), the last message is sent even mam history does have this message. : It causes Individual chat and group chat; it happens more often on group chat.
  2. When a user sends a message on group chat, a time (using stamp on mam history) is not match 1) case 1 : totally wrong
    image 2) case 2 : not same as sent time (6 or 7 hours behind, or just random)

[Attachment]

Could you help me to resolve these issues? Thank you for your time.

arcusfelis commented 5 days ago

Hi,

When a user sends a message on group chat, a time (using stamp on mam history) is not match

What do you mean? Please, post more details (stanzas, ids and what time is and should be)

fluttercid commented 4 days ago

Hi, Thank you for the response. This is data in mam_muc_message image and this is stanza from response of MAM image I tested it around 3 weeks ago and it shouldn't be 1970. If there is anything I need to add, please let me know. Thank you.

arcusfelis commented 4 days ago

yes, looks like somehow we ended up encoding timestamp as 0. Could be a bug in mod_mam_utils:generate_message_id(TS) (TS is provided 0). It gets it from Activity#activity.message_time in mod_muc_room.

Do you use mod_muc or mod_muc_light by the way?

fluttercid commented 3 days ago

I am using a mod_muc now.