Chat by Siropu

Chat by Siropu [Paid] 1.25.1

No permission to buy (€29.99)
I found a bug: if members are posting a lot of whispers then the chat is blank for members entering the chat.

I just came across this situation too (but with 1.24.5 , as I haven't yet upgraded to 1.25.x). It appears that all whispers count as a valid message when determining the maximum amount of messages to display on chat load, including whispers that I (or somebody else) doesn't have permission to see. So if I've set the maximum messages on load to 15 for example and the last 15 messages or whispers to people not including myself then no recent messages will load in for me. Chat Archive pagination also is a little quirky in this case since it may say for example "Showing results 51 to 100" but actually show less than 50 messages since a portion of the counted messages would be hidden whispers that I (rightly) shouldn't see.
 
Unfortunately, it's an expected behavior because you can't predetermine the recipients when loading the messages. Whispers are a simple implementation of private messages and to not affect performance, all messages are loaded in 1 query.

The archive issue has been fixed and it will now show all the messages but keep private the content of the ones that you don't have permission to see.

In 1.25.0 I've added 1on1 private conversations where users can pm each other more easily without interfering with the public messages.
 
Hi @Siropu,

I was running Google PageSpeed Insights and one of the recommendations is to compress with gzip/deflate:
---
Enable compression
Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.
Enable compression for the following resources to reduce their transfer size by 52.9KiB (93% reduction).
Compressing /index.php?chat/refresh could save 52.9KiB (93% reduction).
---

Is it possible in any way to implement this?
 
If you enabled gzip compression on your server, make sure that JSON is compressed as well.
In cpanel there is a feature called "Optimize Website" that allows you to enable compression for all content types.
 
Thanks @Siropu, so it should be via application/json ?

I checked cPanel and ensured "Compress all content" is selected but still according to Google PageSpeed insights this chat URL is not compressed.

It seems gzip is working for all other pages but not for JSON. Not sure if this affects anything but I do have Chat position set to All Pages.

I think I will check with my host to double check my Apache configuration..
 
Upgraded to the new version and just got this error after reopening the chatbox:

Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Duplicate entry '105865' for key 'PRIMARY' - library/Zend/Db/Statement/Mysqli.php:214
Generated By: XXX, 51 minutes ago
Stack Trace
#0 /home/th34dm1nz0n3/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/th34dm1nz0n3/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/th34dm1nz0n3/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /home/th34dm1nz0n3/public_html/library/XenForo/DataWriter.php(1638): Zend_Db_Adapter_Abstract->insert('xf_siropu_chat_...', Array)
#4 /home/th34dm1nz0n3/public_html/library/XenForo/DataWriter.php(1627): XenForo_DataWriter->_insert()
#5 /home/th34dm1nz0n3/public_html/library/XenForo/DataWriter.php(1419): XenForo_DataWriter->_save()
#6 /home/th34dm1nz0n3/public_html/library/Siropu/Chat/ControllerPublic/Chat.php(1373): XenForo_DataWriter->save()
#7 /home/th34dm1nz0n3/public_html/library/XenForo/FrontController.php(351): Siropu_Chat_ControllerPublic_Chat->actionSettings()
#8 /home/th34dm1nz0n3/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/th34dm1nz0n3/public_html/index.php(13): XenForo_FrontController->run()
#10 {main}
Request State
array(3) {
  ["url"] => string(48) "https://theadminzone.com/index.php?chat/settings"
  ["_GET"] => array(1) {
    ["chat/settings"] => string(0) ""
  }
  ["_POST"] => array(7) {
    ["sound"] => array(3) {
      ["whisper"] => string(1) "1"
      ["tagged"] => string(1) "1"
      ["bot"] => string(1) "1"
    }
    ["notification"] => array(4) {
      ["normal"] => string(1) "1"
      ["private"] => string(1) "1"
      ["whisper"] => string(1) "1"
      ["tagged"] => string(1) "1"
    }
    ["display_mode"] => string(17) "above_forums_list"
    ["_xfRequestUri"] => string(1) "/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
I'm having an issue with this chat overloading my server by requesting a hundred thousand refresh requests per hour. My current host says that you shouldn't be using POST for Ajax pulling. Is there a remedy for this? This is causing quite an inconvenience for my site shutting it down for hours during high peak times. Perhaps my userbase is too large for this chat add on?
 
Try setting chat admin options "Refresh chatters list every x seconds" and "Update session every x seconds" to 30 seconds or so.
How many active users do you have in the chat during peak times?
Have you changed the "Refresh rate..." options?
 
Hi @Siropu I would love to see main catagory chatroom with child chatroom support added.

Like for example:

-Default Chatroom
--- General Hockey Chat
------ Team One Chat
------ Team Two Chat
--- General Baseball Chat
------ Team One Chat
------ Team Two Chat
 
Hi,

Can we have different "Database maximum messages display" limits for "chat box above forum list" and chat box tab?
 
Top Bottom