This repository was archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 246
Fix null streams #283
Closed
Closed
Fix null streams #283
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e822f1b
Add stream object to message whenever new messages are received.
Sam1301 43b5203
Bump up database version to account for new stream objects.
Sam1301 b164c1e
Listen for subscriptions updates, add and remove events.
Sam1301 442d686
Listen for muted_topics events.
Sam1301 42b6750
Get unsubscribed streams from user configuration response.
Sam1301 805f1bc
Add documentation.
Sam1301 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,19 @@ | |
|
|
||
| import java.util.List; | ||
|
|
||
|
|
||
| /** | ||
| * This class is used to deserialize the message type event {@link EventsBranch.BranchType#MESSAGE} | ||
| * | ||
| * example : {"flags":[],"message":{"reactions":[],"recipient_id":38, | ||
| * "sender_email":"[email protected]","timestamp":1485172576,"display_recipient":"logs", | ||
| * "sender_id":10,"sender_full_name":"Zulip Error Bot","sender_domain":"zulip.com", | ||
| * "content":"<div class=\"codehilite\"><pre><span></span>10.0.3.1 POST 200 4.1s (db: 217ms/2q) /api/v1/users/me/presence ([email protected] via ZulipAndroid) ([email protected])\n</pre></div>", | ||
| * "stream_id":15,"gravatar_hash":"de425733f46e97dae34e4282037edd7e", | ||
| * "avatar_url":"https://secure.gravatar.com/avatar/de425733f46e97dae34e4282037edd7e?d=identicon", | ||
| * "client":"Internal","content_type":"text/html","subject_links":[],"is_mentioned":false, | ||
| * "sender_short_name":"error-bot","type":"stream","id":1522,"subject":"localhost:9991: slow queries"}, | ||
| * "type":"message","id":8} | ||
| */ | ||
| public class MessageWrapper extends EventsBranch { | ||
| @SerializedName("message") | ||
| private Message message; | ||
|
|
||
26 changes: 26 additions & 0 deletions
26
app/src/main/java/com/zulip/android/networking/response/events/MutedTopicsWrapper.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package com.zulip.android.networking.response.events; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * This class is used to deserialize muted_topic type event | ||
| * {@link EventsBranch.BranchType#MUTED_TOPICS}. | ||
| * | ||
| * example: {"muted_topics":[["devel","(no topic)"],["foraaron","(no topic)"],["announce","Streams"]], | ||
| * "type":"muted_topics","id":20} | ||
| */ | ||
|
|
||
| public class MutedTopicsWrapper extends EventsBranch{ | ||
| @SerializedName("muted_topics") | ||
| private List<List<String>> mutedTopics; | ||
|
|
||
| public List<List<String>> getMutedTopics() { | ||
| return this.mutedTopics; | ||
| } | ||
|
|
||
| public void setMutedTopics(List<List<String>> mutedTopics) { | ||
| this.mutedTopics = mutedTopics; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,12 @@ | |
| import com.google.gson.annotations.SerializedName; | ||
| import com.zulip.android.models.Presence; | ||
|
|
||
|
|
||
| /** | ||
| * This class is used to deserialize the presence type event {@link EventsBranch.BranchType#PRESENCE} | ||
| * | ||
| * example : {"id":0,"server_timestamp":1485171896.1950330734,"type":"presence","email":"[email protected]", | ||
| * "presence":{"ZulipAndroid":{"status":"active","timestamp":1485171896,"client":"ZulipAndroid","pushable":null}}} | ||
| */ | ||
| public class PresenceWrapper extends EventsBranch { | ||
|
|
||
| @SerializedName("server_timestamp") | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These subscribers is the list of email right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes