This repository has been archived by the owner on Apr 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Private pusher channel #138
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
d3f5efb
WIP: Private pusher channel [skip ci]
bitamar a1348fc
Re-adding offline interop [skip ci]
bitamar ee7995c
Pusher auth [skip ci]
bitamar 0ade019
Subscribing to the private channel [skip ci]
bitamar 4f1c80a
Cleaning up me endpoint [skip ci]
bitamar b44ccbf
Fetching user's pusher channel from backend [skip ci]
bitamar 5b62d1b
Logging into pusher only after user is fetched [skip ci]
bitamar d0b4b32
Updating dummyUser
bitamar 54475bf
Sniffer fixes
bitamar 9a79611
Merge branch 'master' into 123-private-pusher-channel
bitamar 0a74252
Cleaning up pusher login call [skip ci]
bitamar a539ed1
Adding private note on items [skip ci]
bitamar 95384b8
Displaying private note
bitamar 006bb53
Removing unused pusher parts, and wiring pusher logout
bitamar fde3b02
Fixing pusher test
bitamar 7e77f7c
Updating the pusher model when calling pusherLogin and pusherLogout […
bitamar 3babb2e
Ordering msgs [skip ci]
bitamar 034394c
Cleaning up item view [skip ci]
bitamar e6d7ef6
cleanup login message creation [skip ci]
bitamar 14507ff
showMaybe privateNote [skip ci]
bitamar 47cc8ff
Fixes
bitamar 73b2f88
Replacing "access private pusher channel" with "access private fields"
bitamar 7dcf9be
Adding information about the private pusher channel to the readme
bitamar 6c49099
Updating pusher description
bitamar 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 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 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 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module App.PageType exposing (Page(..)) | ||
|
||
{-| Prevent circula dependency. | ||
{-| Prevent circular dependency. | ||
-} | ||
|
||
|
||
|
This file contains 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 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 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 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 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 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 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 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,6 +3,19 @@ module Pusher.Model exposing (..) | |
import Item.Model exposing (Item, ItemId) | ||
|
||
|
||
type alias Model = | ||
{ connectionStatus : ConnectionStatus | ||
, errors : List PusherError | ||
} | ||
|
||
|
||
emptyModel : Model | ||
emptyModel = | ||
{ connectionStatus = Initialized | ||
, errors = [] | ||
} | ||
|
||
|
||
type Cluster | ||
= ApSouthEast1 | ||
| EuWest1 | ||
|
@@ -25,8 +38,48 @@ type PusherEventData | |
= ItemUpdate Item | ||
|
||
|
||
type AccessToken | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
= AccessToken String | ||
|
||
|
||
type alias PusherChannel = | ||
String | ||
|
||
|
||
type alias PusherConfig = | ||
{ key : String | ||
, cluster : String | ||
, authEndpoint : String | ||
, channel : String | ||
, eventNames : List String | ||
} | ||
|
||
|
||
type ConnectionStatus | ||
= Initialized | ||
| Connecting (Maybe Int) | ||
| Connected | ||
| Unavailable (Maybe Int) | ||
| Failed | ||
| Disconnected | ||
| Other String | ||
|
||
|
||
type alias PusherError = | ||
{ code : Maybe Int | ||
, message : Maybe String | ||
} | ||
|
||
|
||
{-| Return the event names that should be added via JS. | ||
-} | ||
eventNames : List String | ||
eventNames = | ||
[ "item__update" ] | ||
|
||
|
||
type Msg | ||
= HandleError PusherError | ||
| HandleStateChange String | ||
| Login PusherAppKey PusherChannel AccessToken | ||
| Logout |
This file contains 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
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.
👍