amitmmc1 / xmpphp

Automatically exported from code.google.com/p/xmpphp
0 stars 0 forks source link

presence requires 'from' field #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. send presence to chat room
2. send message to chat room

What is the expected output? What do you see instead?

Should see message in chat room.  But message does not appear.  Message
WILL appear if presence includes from='jid/alias'

What version of the product are you using? On what operating system?

Using latest debian test package which I believe is 0.1beta-r54

Please provide any additional information below.

Easy fix is to modify XMPP.php->presence to add the from field:
...
public function presence($status = null, $show = 'available', $to = null,
$type='available') {
    if($type == 'available') $type = '';
    $to  = htmlspecialchars($to);
    $status = htmlspecialchars($status);
    if($show == 'unavailable') $type = 'unavailable';

    $out = "<presence from='{$this->fulljid}";
...

Original issue reported on code.google.com by andydor...@comehome.net on 21 Mar 2009 at 9:14

GoogleCodeExporter commented 8 years ago
The from field MUST be rewritten by the server.  This is a bug with your 
server, not
a bug with XMPPHP

Original comment by nathanfr...@gmail.com on 3 Apr 2009 at 8:23