ejabberd - Comments for "ejabberd-2.0.0 rosterusers db model" https://www.ejabberd.im/node/2973 en This isn't documented, so https://www.ejabberd.im/node/2973#comment-52164 <p>This isn't documented, so let's hope the source code is explanatory.</p> <p>Reading the function record_to_string in mod_roster_odbc.erl:</p> <pre> SSubscription = case Subscription of both -&gt; "B"; to -&gt; "T"; from -&gt; "F"; none -&gt; "N" end, SAsk = case Ask of subscribe -&gt; "S"; unsubscribe -&gt; "U"; both -&gt; "B"; out -&gt; "O"; in -&gt; "I"; none -&gt; "N" end, </pre><p> The explanation of 'both', 'none'... come from the XMPP-IM RFC, check <noindex><a href="http://www.xmpp.org" title="www.xmpp.org" rel="nofollow" >www.xmpp.org</a></noindex></p> <p>And finally the string is composed:</p> <pre> ["'", Username, "'," "'", SJID, "'," "'", Nick, "'," "'", SSubscription, "'," "'", SAsk, "'," "'", SAskMessage, "'," "'N', '', 'item'"].</pre><p> The order is implied reading the header of another function:</p> <pre> raw_to_record(LServer, {User, SJID, Nick, SSubscription, SAsk, SAskMessage, _SServer, _SSubscribe, _SType}) </pre><p>So it seems SServer = 'N', SSubscribe ='', and SType = 'item'</p> <p>It would be nice to have this properly described someday.</p> Sat, 12 Apr 2008 00:10:38 +0000 mfoss comment 52164 at https://www.ejabberd.im