GetStream / stream-chat-php

Stream Chat official PHP API Client
https://getstream.io/chat/
BSD 3-Clause "New" or "Revised" License
30 stars 9 forks source link

location setting is not effect at all #25

Closed giautm closed 3 years ago

giautm commented 4 years ago

API call still going to http://chat-us-east-1.stream-io-api.com

https://github.com/GetStream/stream-chat-php/blob/09b6862ffb33959fa806fc28d591084291912959/lib/GetStream/StreamChat/Client.php#L119-L124

Correct base URL for Singapore is https://chat-proxy-singapore.stream-io-api.com

gz#5831

shodgetts commented 4 years ago

Agent comment from Seetha in Zendesk ticket #5831:

Hi Giautm

Thanks for reaching to us.

const API_ENDPOINT = 'chat-us-east-1.stream-io-api.com';

This should be replaced by the location.

https://github.com/GetStream/stream-chat-php/blob/09b6862ffb33959fa806fc28d591084291912959/lib/GetStream/StreamChat/Client.php#L119-L124 ​ Can you check for BaseURL? Please let me know if this has been set up.

client.setBaseURL('https://chat-proxy-singapore.stream-io-api.com');

Let me also check the value of STREAM_BASE_CHAT_URL.

Cheers Seetha

giautm commented 4 years ago

Currently, I workaround by setting STREAM_BASE_CHAT_URL on environment. I report this to allow set base URL from location when initial the client: https://github.com/GetStream/stream-chat-php/blob/09b6862ffb33959fa806fc28d591084291912959/lib/GetStream/StreamChat/Client.php#L68

tbarbugli commented 4 years ago

@giautm thank you for reporting this 👍 We are going to make this consistent with the other API clients.