Skip to content

Commit

Permalink
core: Send hardcoded User-Agent header in requests
Browse files Browse the repository at this point in the history
This is required for the server to automatically mark
sent messages as read. See `sent_by_human` in
`zulip/zerver/models.py`.

Fixes: zulip#440
  • Loading branch information
sirpengi committed Dec 14, 2023
1 parent c06855e commit 5c4d4f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/api/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ class ApiConnection {

addAuth(request);

// TODO(#453): Create real User-Agent string
request.headers['User-Agent'] = 'ZulipMobile/?.?.? (Android 14)';

final http.StreamedResponse response;
try {
response = await _client.send(request);
Expand Down

0 comments on commit 5c4d4f2

Please sign in to comment.