Projects tigase _server server-core Issues #1376
extension muc message not storage database in message archive component (#1376)
Unknown opened 5 years ago

Describe

  1. tigase 8.0.0-b10083 version
  2. mysql 5.7.21
  3. message archive component(message-archive=4:2318, version: 2.0.0-b241/06879836)

configuration in config.tdsl

'config-type' = 'default'

'default-virtual-host' = 'im.com'

debug = ['db' , 'server' , 'xmpp.XMPPIOService' ]

dataSource {

    default () {
        uri = 'jdbc:mysql://localhost:3306/tigase8?user=test&password=test&useSSL=false&autoCreateUser=true'
    }
}

muc () {
    'message-filter-enabled' = false
}

message-archive {
        'default-store-method' = 'message'
        'store-muc-messages' = 'true' 
}

sess-man {
    message-archive {
        'default-store-method' = 'message'
        'store-muc-messages' = 'true' 
    }

    message-archive-xep-0136 () {
    }

    urn:xmpp:mam:1 () {
    }
}

describe

question 1 : what can I do, server can auto storage message? I want storage <message>......</message>

-- send to server
<iq type='get' id='prefq'>
  <pref xmlns='urn:xmpp:archive'/>
</iq>

--  recevie
<iq to="chen@im.com/Psi+" id="prefq" type="result">
<pref xmlns="urn:xmpp:archive">
<auto save="false"/>
<default otr="forbid" save="message" muc-save="false"/>
<method use="prefer" type="auto"/>
<method use="prefer" type="local"/>
<method use="prefer" type="manual"/>
</pref>
</iq>

message not auto archive, if client send <auto save="true"/> iq message to server, server can storage this client message

-- send to server
<iq type='set' id='prefq'>
  <pref xmlns='urn:xmpp:archive'>
<auto save="true"/>
</pref>
</iq>

<iq type='get' id='prefq'>
  <pref xmlns='urn:xmpp:archive'/>
</iq>

--recevie
<iq to="chen@im.com/Psi+" id="prefq" type="result">
<pref xmlns="urn:xmpp:archive">
<auto save="true"/>
<default otr="forbid" save="message" muc-save="false"/>
<method use="prefer" type="auto"/>
<method use="prefer" type="local"/>
<method use="prefer" type="manual"/>
</pref>
</iq>

question 2 : what can I do, muc extension message can be message archive, storage ......

  • one to one chart
<message to="kevin@im.com/Psi+" id="ab4ba" type="chat">
<body>fsdf</body>
<request xmlns="urn:xmpp:receipts"/>
</message>

<message to="kevin@im.com/Psi+" id="ab4ba" type="chat">
<body>test</body>
<test>extension message</test>
<request xmlns="urn:xmpp:receipts"/>
</message>
  • groupchart
<message to="chen@im.com/Psi+" id="ab4fa" type="groupchat" from="mam@muc.im.com/chen">
<body>test</body>
</message>
<message to="chen@im.com/Psi+" id="ab4fa" type="groupchat" from="mam@muc.im.com/chen">
<body>test</body>
<test xmlns="xxx:test"> muc extension message</test>
</message>

1, 2, 3 can be storage in database, but 4 can not be storgae in database?????

please help me !!!!!!!

Unknown commented 5 years ago

question 1 : what can I do, server can auto storage message? I want storage ......

You should use required-store-method - it enforces minimal level or message archive (so user won't be able to disable it)

question 2 : what can I do, muc extension message can be message archive, storage ......

Was the stanza message stored in the database ("test") or there is no trace at all of the message with that ID?

Unknown commented 5 years ago
  1. yes, you're right, required-store-method = trueis the key, tigase server can auto message archive
  2. muc extension message can be stored,not problem
issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1376
Please wait...
Page is in error, reload to recover