-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experimental Zulip support #184
Open
aglasgall
wants to merge
26
commits into
barnowl:master
Choose a base branch
from
aglasgall:zulip-rebased
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
cb463cd
first draft of zulip module
aglasgall fa4c773
fix retries in Zulip module
aglasgall 5afbccf
Better HTTPS support
aglasgall e25b189
add README
aglasgall 7eda6b3
Add subscription manipulation
aglasgall 7727a68
Improve messages on successfully subscribing/unsubscribing to/from st…
aglasgall 6ee496b
Initial support for displaying message edits
aglasgall efb0807
update README
aglasgall c753a6a
further README updates
aglasgall cc6de81
untabify files and add file-local variables to keep them that way. Th…
aglasgall ca7ab9d
initial implementation of presence
aglasgall 6607b83
Fix whitespace in Message/Zulip.pm
dehnert 9ec88c6
Zulip: warn about lack of SSL in an admin message
dehnert 05b1ab8
Zulip: Better private reply support
dehnert 7c6a07f
reset presence interval to 60s now that it works
aglasgall 30eb401
smartfilter part 1: personal threads
aglasgall a93ff35
smartfilter part 2: class messages
aglasgall 2776966
Add zulip:getsubs to list current subscriptions
aglasgall 51ce84b
grody but functional smartfilter support for names with spaces
aglasgall ac53f3d
giant README update
aglasgall 8c77c4f
more README
aglasgall eda7d62
Don't try to register for events if zulip is not configured (e.g. if …
aglasgall 6226f0e
more README updates
aglasgall 20fb602
Actually build zulip module as part of build
aglasgall e5f5e2c
Make -c and -s options to zulip:write required
aglasgall f0bd871
add missing Makefile.PL
aglasgall 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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use inc::Module::Install; | ||
|
||
requires('AnyEvent::HTTP'); | ||
requires('AnyEvent::TLS'); | ||
requires('JSON'); | ||
requires('URI'); | ||
requires('URI::Encode'); | ||
requires('MIME::Base64'); | ||
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. These requirements should be documented in the top-level |
||
|
||
barnowl_module('Zulip'); | ||
|
||
WriteAll; |
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 |
---|---|---|
@@ -0,0 +1,134 @@ | ||
-*- text -*- | ||
|
||
BarnOwl::Module::Zulip is a terminal client for the Zulip | ||
(https://zulip.org/) chat system. Zulip is influenced heavily by | ||
Zephyr and so BarnOwl is a pretty good match for it. | ||
|
||
|
||
PREREQUISITES | ||
|
||
- all the normal BarnOwl dependencies, including PAR and AnyEvent::HTTP | ||
|
||
- URI::Encode | ||
|
||
|
||
SETUP | ||
|
||
You'll need to get your personal API key from Zulip. You can find this | ||
on your "settings" page. | ||
|
||
To use BarnOwl::Module::Zulip, create a file called "zulip" in | ||
~/.owl. The contents of this file should be a JSON dictionary: | ||
|
||
{ "user": <the email address you use to log into Zulip>, | ||
"apikey": <your personal API key>, | ||
"api_url": <the API URL root for your Zulip instance. Should look something like 'https://chat.zulip.org/api/v1'. MUST NOT have a trailing / right now>, | ||
"default_realm": <optionally, the domain name you expect most users on your realm to have usernames under. Convenience feature for letting you send personals with less typing> | ||
} | ||
|
||
If your Zulip instance uses HTTPS (as it should), it is optional (but *HIGHLY RECOMMENDED*) to specify an additional set of options in the dictionary: | ||
|
||
{ "user": <same as before>, | ||
... | ||
"ssl": { | ||
"ca_file": <path to your system's list of trusted root SSL certificates. It's /etc/ssl/certs/ca-certificates.crt on Ubuntu or Debian> | ||
} | ||
} | ||
|
||
If your Zulip instance requires SSL client credentials, specify the | ||
paths to the certificate and key as "cert_file" and "key_file", | ||
respectively, under "ssl". | ||
|
||
|
||
USAGE | ||
|
||
When you start BarnOwl, you should run "zulip:login". Or put it at the | ||
end of ~/.owl/startup. | ||
|
||
|
||
FEATURES: | ||
|
||
- sending and receiving zulip stream and personal messages (including | ||
with multiple recipients, mostly-functionally) | ||
|
||
- listing, adding, and removing subscriptions | ||
|
||
- minimal support for stream creation (if you try to sub to a stream | ||
that doesn't exist, it'll _probably_ create a new one with whatever | ||
your site's default settings are) | ||
|
||
- full filter language support (message attributes are mostly the same | ||
as zephyr) including support for "punt" and mostly-functional | ||
smartfilter. | ||
|
||
- support for displaying message edits (they show up as new messages | ||
with the correct stream/topic/sender with the new text and opcode | ||
EDIT) | ||
|
||
|
||
MISSING/UNFINISHED FEATURES: | ||
|
||
- backfilling from history (this will be hard. barnowl currently only | ||
supports appending to the msglist from perl, and I think the msglist | ||
is also an array, so that's potential badness) | ||
|
||
- smartnarrow robustness (has been ported from C, but almost certainly | ||
still has weird corner cass) | ||
|
||
- better handling of personals with multiple recipients (I think Alex | ||
implemented this, but more testing is never bad) | ||
|
||
- syncing the curmsg pointer with the server | ||
|
||
- sending presence more cleverly (right now it just sends a ping every | ||
minute regardless of how active you are) | ||
|
||
- deleting messages is probably interestingly broken right now w/r/t | ||
the hash of zid -> barnowl message id. make it work. | ||
|
||
- being able to view user presence (ala zlocate/aim buddy list/jabber | ||
roster/etc) | ||
|
||
- being able to invite people to invite-only streams | ||
|
||
- improved URL generation. We shouldn't have to warn people not to | ||
have a trailing / in their api_url setting. | ||
|
||
|
||
FEATURES THAT SHOULD PROBABLY EXIST BUT THAT I DON'T REALLY CARE ABOUT | ||
MUCH | ||
|
||
- editing messages | ||
|
||
- option to allow in-place update of edited messages instead of adding | ||
a new message | ||
|
||
- being able to create a stream with options (e.g. invite-only) set | ||
|
||
- being able to edit attributes of streams (zephyr doesn't have 'em, | ||
but zulip does) | ||
|
||
- being able to delete streams | ||
|
||
- being able to see a list of people subscribed to a given stream | ||
|
||
|
||
FEATURES THAT WOULD BE HILARIOUS | ||
|
||
- zcrypt support | ||
|
||
|
||
OTHER DEVELOPMENT WORK: | ||
|
||
- general robustness (e.g. if you try to zulip:login again after | ||
do_poll has given up (because the server went away and didn't come | ||
back in a reasonable time, it probably crashes hard.) | ||
|
||
- code cleanup (kill globals with fire, refactor long functions, | ||
possibly break out some modules?) | ||
|
||
- Probably break out AnyEvent::Zulip into a separate module that this | ||
just uses | ||
|
||
- get this merged into barnowl mainline, especially now that it has an | ||
XS change (i.e. it's not just a drop-in PAR anymore) |
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.
This seems to be a whitespace-only change.