Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit 01f28b2

Browse files
committed
Use new UrlHelper to prefix url host to path
1 parent e1277c5 commit 01f28b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/main/java/com/zulip/android/models/Message.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.zulip.android.R;
2222
import com.zulip.android.ZulipApp;
2323
import com.zulip.android.util.CustomHtmlToSpannedConverter;
24+
import com.zulip.android.util.UrlHelper;
2425
import com.zulip.android.util.ZLog;
2526

2627
import org.apache.commons.lang.builder.EqualsBuilder;
@@ -763,7 +764,7 @@ public String extractImageUrl(ZulipApp zulipApp) {
763764
match = match.substring(0, match.indexOf("\""));
764765

765766
if(match.indexOf("/") == 0) {
766-
return zulipApp.getServerURI().substring(0, zulipApp.getServerURI().indexOf("/api")) + match;
767+
return UrlHelper.addHost(match);
767768
}
768769
return match;
769770
}

0 commit comments

Comments
 (0)