[4168] in BarnOwl Developers
[barnowl/barnowl] Experimental Zulip support (#184)
daemon@ATHENA.MIT.EDU (Adam Glasgall)
Tue Oct 17 03:09:45 2017
Date: Mon, 16 Oct 2017 17:47:10 +0000 (UTC)
From: Adam Glasgall <notifications@github.com>
Reply-To: barnowl/barnowl <reply+004448c9585a392a9e990ad07a5516794fd6808c82adf91a92cf0000000115fcb29e92a169ce0fd8a3d7@reply.github.com>
To: barnowl/barnowl <barnowl@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
----==_mimepart_59e4f09e201e6_15a13f93c5f3ef38100472
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
This PR adds experimental support for the Zulip [https://zulipchat.com/] chat system. Zulip is inspired by Zephyr and so it fits pretty well into the model Barnowl expects.
As implemented, the code supports:
- 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)
It is missing, among other things:
- backfilling from history (this will be hard. barnowl currently only
supports appending to the msglist from perl, and the msglist
is also an array, so that's badness). Really, the right thing here is sqlite, but that's a very big piece to bite off.
- smartnarrow robustness (has been ported from C, but almost certainly
still has weird corner cass)
- better handling of personals with multiple recipients
- 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 (probably just a new command; should hopefully be straightforward)
- improved URL generation. We shouldn't have to warn people not to
have a trailing / in their api_url setting (this one is probably an easy fix).
- 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
It is absolutely usable as a "daily driver" - I've been using it with the Zulip instance at my job for the past few years. The main driver for making this part of barnowl instead of an out-of-tree module is that support for handling message edit notifications required a small bit of XS (so you have to patch barnowl anyway to use it, so it may as well be in mainline)
You can view, comment on, or merge this pull request online at:
https://github.com/barnowl/barnowl/pull/184
-- Commit Summary --
* first draft of zulip module
* fix retries in Zulip module
* Better HTTPS support
* add README
* Add subscription manipulation
* Improve messages on successfully subscribing/unsubscribing to/from streams
* Initial support for displaying message edits
* update README
* further README updates
* Zulip: warn about lack of SSL in an admin message
* untabify files and add file-local variables to keep them that way. Thanks to adehnert for noticing the tabs
* initial implementation of presence
* reset presence interval to 60s now that it works
* Zulip: Better private reply support
* Fix whitespace in Message/Zulip.pm
* smartfilter part 1: personal threads
* smartfilter part 2: class messages
* Add zulip:getsubs to list current subscriptions
* grody but functional smartfilter support for names with spaces
* giant README update
* more README
* Don't try to register for events if zulip is not configured (e.g. if it couldn't parse the config file). Thanks to Alex Dehnert for the bug report
* more README updates
* Actually build zulip module as part of build
* Make -c and -s options to zulip:write required
-- File Changes --
M perl/lib/BarnOwl.pm (2)
M perl/lib/BarnOwl/Message.pm (36)
M perl/modules/Makefile.am (2)
A perl/modules/Zulip/README (134)
A perl/modules/Zulip/lib/BarnOwl/Message/Zulip.pm (184)
A perl/modules/Zulip/lib/BarnOwl/Module/Zulip.pm (522)
M perlglue.xs (21)
-- Patch Links --
https://github.com/barnowl/barnowl/pull/184.patch
https://github.com/barnowl/barnowl/pull/184.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/barnowl/barnowl/pull/184
----==_mimepart_59e4f09e201e6_15a13f93c5f3ef38100472
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p>This PR adds experimental support for the Zulip [https://zulipchat.com/] chat system. Zulip is inspired by Zephyr and so it fits pretty well into the model Barnowl expects.</p>
<p>As implemented, the code supports:</p>
<ul>
<li>
<p>sending and receiving zulip stream and personal messages (including<br>
with multiple recipients, mostly-functionally)</p>
</li>
<li>
<p>listing, adding, and removing subscriptions</p>
</li>
<li>
<p>minimal support for stream creation (if you try to sub to a stream<br>
that doesn't exist, it'll <em>probably</em> create a new one with whatever<br>
your site's default settings are)</p>
</li>
<li>
<p>full filter language support (message attributes are mostly the same<br>
as zephyr) including support for "punt" and mostly-functional<br>
smartfilter.</p>
</li>
<li>
<p>support for displaying message edits (they show up as new messages<br>
with the correct stream/topic/sender with the new text and opcode<br>
EDIT)</p>
</li>
</ul>
<p>It is missing, among other things:</p>
<ul>
<li>
<p>backfilling from history (this will be hard. barnowl currently only<br>
supports appending to the msglist from perl, and the msglist<br>
is also an array, so that's badness). Really, the right thing here is sqlite, but that's a very big piece to bite off.</p>
</li>
<li>
<p>smartnarrow robustness (has been ported from C, but almost certainly<br>
still has weird corner cass)</p>
</li>
<li>
<p>better handling of personals with multiple recipients</p>
</li>
<li>
<p>syncing the curmsg pointer with the server</p>
</li>
<li>
<p>sending presence more cleverly (right now it just sends a ping every<br>
minute regardless of how active you are)</p>
</li>
<li>
<p>deleting messages is probably interestingly broken right now w/r/t<br>
the hash of zid -> barnowl message id. make it work.</p>
</li>
<li>
<p>being able to view user presence (ala zlocate/aim buddy list/jabber<br>
roster/etc)</p>
</li>
<li>
<p>being able to invite people to invite-only streams (probably just a new command; should hopefully be straightforward)</p>
</li>
<li>
<p>improved URL generation. We shouldn't have to warn people not to<br>
have a trailing / in their api_url setting (this one is probably an easy fix).</p>
</li>
<li>
<p>editing messages</p>
</li>
<li>
<p>option to allow in-place update of edited messages instead of adding<br>
a new message</p>
</li>
<li>
<p>being able to create a stream with options (e.g. invite-only) set</p>
</li>
<li>
<p>being able to edit attributes of streams (zephyr doesn't have 'em,<br>
but zulip does)</p>
</li>
<li>
<p>being able to delete streams</p>
</li>
<li>
<p>being able to see a list of people subscribed to a given stream</p>
</li>
</ul>
<p>It is absolutely usable as a "daily driver" - I've been using it with the Zulip instance at my job for the past few years. The main driver for making this part of barnowl instead of an out-of-tree module is that support for handling message edit notifications required a small bit of XS (so you have to patch barnowl anyway to use it, so it may as well be in mainline)</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/barnowl/barnowl/pull/184'>https://github.com/barnowl/barnowl/pull/184</a></p>
<h4>Commit Summary</h4>
<ul>
<li>first draft of zulip module</li>
<li>fix retries in Zulip module</li>
<li>Better HTTPS support</li>
<li>add README</li>
<li>Add subscription manipulation</li>
<li>Improve messages on successfully subscribing/unsubscribing to/from streams</li>
<li>Initial support for displaying message edits</li>
<li>update README</li>
<li>further README updates</li>
<li>Zulip: warn about lack of SSL in an admin message</li>
<li>untabify files and add file-local variables to keep them that way. Thanks to adehnert for noticing the tabs</li>
<li>initial implementation of presence</li>
<li>reset presence interval to 60s now that it works</li>
<li>Zulip: Better private reply support</li>
<li>Fix whitespace in Message/Zulip.pm</li>
<li>smartfilter part 1: personal threads</li>
<li>smartfilter part 2: class messages</li>
<li>Add zulip:getsubs to list current subscriptions</li>
<li>grody but functional smartfilter support for names with spaces</li>
<li>giant README update</li>
<li>more README</li>
<li>Don't try to register for events if zulip is not configured (e.g. if it couldn't parse the config file). Thanks to Alex Dehnert for the bug report</li>
<li>more README updates</li>
<li>Actually build zulip module as part of build</li>
<li>Make -c and -s options to zulip:write required</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/barnowl/barnowl/pull/184/files#diff-0">perl/lib/BarnOwl.pm</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/barnowl/barnowl/pull/184/files#diff-1">perl/lib/BarnOwl/Message.pm</a>
(36)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/barnowl/barnowl/pull/184/files#diff-2">perl/modules/Makefile.am</a>
(2)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/barnowl/barnowl/pull/184/files#diff-3">perl/modules/Zulip/README</a>
(134)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/barnowl/barnowl/pull/184/files#diff-4">perl/modules/Zulip/lib/BarnOwl/Message/Zulip.pm</a>
(184)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/barnowl/barnowl/pull/184/files#diff-5">perl/modules/Zulip/lib/BarnOwl/Module/Zulip.pm</a>
(522)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/barnowl/barnowl/pull/184/files#diff-6">perlglue.xs</a>
(21)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/barnowl/barnowl/pull/184.patch'>https://github.com/barnowl/barnowl/pull/184.patch</a></li>
<li><a href='https://github.com/barnowl/barnowl/pull/184.diff'>https://github.com/barnowl/barnowl/pull/184.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/barnowl/barnowl/pull/184">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AERIyYx6DNmqIbH28_2bKvIE60WUXEjDks5ss5aegaJpZM4P6_o2">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AERIyaIGgVZgtsxAVRmrOQJgvhdheLQBks5ss5aegaJpZM4P6_o2.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/barnowl/barnowl/pull/184"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/barnowl/barnowl","title":"barnowl/barnowl","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/barnowl/barnowl"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Experimental Zulip support (#184)"}],"action":{"name":"View Pull Request","url":"https://github.com/barnowl/barnowl/pull/184"}}}</script>
----==_mimepart_59e4f09e201e6_15a13f93c5f3ef38100472--