Closed ghost closed 10 years ago
The $pm variable is not declared in this scope, and given that the function may not be used to create a PM channel, the ternary clause is unnecessary.
return $this->httpReq('post',$this->_baseUrl.'channels'.($pm?'/pm/messsages':''), $json, 'application/json');
With this version, however:
return $this->httpReq('post',$this->_baseUrl.'channels', $json, 'application/json');
with this data object:
{"type":"ca.roaringsky.group","writers":{"immutable":"0","public":"0","user_ids":"10403","73417"]}}
the call fails to complete. Suggestions?
@roaringskysoftware is your data object valid JSON?
i think that
"user_ids":"10403","73417"]
is supposed to be
"user_ids": ["10403","73417"]
The $pm variable is not declared in this scope, and given that the function may not be used to create a PM channel, the ternary clause is unnecessary.
With this version, however:
with this data object:
the call fails to complete. Suggestions?