Not logged in. · Lost password · Register
Forum: XMPP XMPP Protocol RSS
Avatar
oceanskywang #1
Member since Jan 2008 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to Clear the Chatting History of a room from server side?
Hi All, I find whenever i join a room, the server will send all the chatting history of the room to my jabber client.
To reduce the traffic loads, I want to clear the chatting history from the jabber server.  Can anyone please help me?Thanks!
Avatar
Alex #2
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

When joining the chat room you can disable the history, or overwrite the default settings for the history.

See 7.1.16 in XEP-0045: Multi-User Chat

especially this xml example:
Quote by from XEP-0045:
Example 36. User Requests No History

  1. <presence
  2.     from='hag66@shakespeare.lit/pda'
  3.     to='darkcave@macbeth.shakespeare.lit/thirdwitch'>
  4.  <x xmlns='http://jabber.org/protocol/muc'>
  5.     <history maxchars='0'/>
  6.  </x>
  7. </presence>

I think this question came up several times here in the forums yet.
We could add a function JoinWithoutHistory history to the MucManager or a boolean parameter to the Join function if this is requested and helpful.

Alex
Alexander Gnauck
AG-Software
Avatar
oceanskywang #3
Member since Jan 2008 · 4 posts
Group memberships: Members
Show profile · Link to this post
Thank you so much, Alex.
Avatar
oceanskywang #4
Member since Jan 2008 · 4 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Hello, Alex! Thank you so much for your help and please forgive my poor English :).
I think the way you mentioned above is only to change the query conditions at the client side, but those messages stored in the server will still be there and that will bring more and more storage at hard disk . If I want to clear chat history from the jabber server, then how can I do?
Thanks!
Avatar
Alex #5
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
When you create a new chat room can configure whether the rooms will be logged or not.
But this depends also on the server software you are using.
You should contact your server vendor for this.

Alex
Alexander Gnauck
AG-Software
Avatar
Alex #6
Member since Feb 2003 · 4245 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I checked in new Muc code which allows you to join a room and disable the history now.

Alex
Alexander Gnauck
AG-Software
Avatar
oceanskywang #7
Member since Jan 2008 · 4 posts
Group memberships: Members
Show profile · Link to this post
Thank you very much for your help. Alex:)
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: XMPP XMPP Protocol RSS