Commit Graph

117 Commits (8e2505731674717353758ad9218100e9f4404612)

Author SHA1 Message Date
Michael Santos 8e25057316 Fix typo in comment 1 year ago
Michael Santos 11d854f9e7 0.14.5: fix usage 2 years ago
Michael Santos 840ef08251 0.14.4: standardize exit status
* 2: usage errors
* 0: usage (-h)
2 years ago
Michael Santos 2df5896df2 Set a unique default resource
The default resource is "xmppipe". A subsequent xmppipe using the default
resource connects to the groupchat will be disconnected.

* reduce the amount of configuration needed for scripts
* make the resource unique on the same host by appending the PID
2 years ago
Michael Santos f9bdddd910 0.14.1: --chat: fix use of username without domain
One to one chats with a username without a domain would echo back
messages. Use the domain from the user's JID:

```
xmppipe -u user1@example.com --chat user2
```
2 years ago
Michael Santos 80135667d6 usage: cleanup 4 years ago
Michael Santos f80ab9c65e Update README/usage 4 years ago
Michael Santos 91a43f2433 -V/--version: display version information 4 years ago
Michael Santos 45e96e6ea9 s/XMPPIPE_RESTRICT/RESTRICT/gi 5 years ago
Michael Santos 7dda5bafcd sandbox->restrict_process 5 years ago
Michael Santos abfa336640 xmppipe_uuid_gen: xmpp_uuid_gen NULL check wrapper 5 years ago
Michael Santos 31d6a03bfc XEP-0363: HTTP File Upload
Add initial support for XEP-0363. HTTP uploads can be used when colon
separated values for stdin is enabled:

~~~

u::::<filename>|<size (bytes)>[|<content-type>]

u::::example.png%7C16698

u::::tr.png%7C16698%7Cimage%2Fpng
~~~

The reponse:

~~~
U:upload.example.com:user@example.com/477937350262208314215778:https%3A%2F%2Fexample.com%2Fupload%2F1234%2Fabc%2Fexample.png%7Chttps%3A%2F%2Fexample.com%2Fupload%2F1234%2Fabc%2Fexample.png
~~~

TODO:

* support PUT header elements
* support/test error conditions

Questions:

* save the maximum file size returned by the server and disallow uploads
  larger than the value?

* xmppipe is "pinned" to the upload server returned in the IQ reply (the
  "to" field is ignored)

  * allow other upload servers?
  * error if different upload server is specified in "u:<from>:<to>"?
5 years ago
Michael Santos 5f2c3003ff v0.13.0
Update usage with --format option.
5 years ago
Michael Santos a45b734211 options: remove --chat-marker 5 years ago
Michael Santos 2a75c3373a Always display chat markers
Remove the option to explicitly enable/disable chat markers.
5 years ago
Michael Santos 5e488e059a xmpp_conn_set_flags() argument is a long
Correct the type for the flag argument from int to long. Note the
compiler will still complain because, although xmpp_conn_set_flags() is
declared to take a signed long, the constants are declared as unsigned
longs:

src/xmppipe.c: In function ‘main’:
src/xmppipe.c:205:13: warning: conversion to ‘long unsigned int’ from
‘long int’ may change the sign of the result [-Wsign-conversion]
       flags |= XMPP_CONN_FLAG_TRUST_TLS;
             ^
src/xmppipe.c:205:16: warning: conversion to ‘long int’ from ‘long
unsigned int’ may change the sign of the result [-Wsign-conversion]
       flags |= XMPP_CONN_FLAG_TRUST_TLS;
5 years ago
Michael Santos 8776afe0f5 Suppress conversion warnings 5 years ago
Michael Santos 42e0ce4a67 xmppipe: free child stanzas 5 years ago
Michael Santos e00a7fddd2 Consistently format using clang-format 5 years ago
Michael Santos 4b85976242 --keepalives -> --keepalive 5 years ago
Michael Santos 7793b0ac07 Fix pasto in -k/--keepalive 5 years ago
Michael Santos b3991577aa reorg: event_loop: move to separate file 5 years ago
Michael Santos 4081ab67cb reorg: muc_unlock 5 years ago
Michael Santos 5165f8a1a4 reorg: muc_subject 5 years ago
Michael Santos 9d6b58ba26 reorg: muc: join 5 years ago
Michael Santos 6731de9a13 reorg: ping 5 years ago
Michael Santos 0ba9e92eda reorg: stream management: ack 5 years ago
Michael Santos ee0f59516b reorg: stream_close: move to util for now 5 years ago
Michael Santos 862ab6d313 reorg: stream management: request 5 years ago
Michael Santos 5cb7647e75 reorg: stream management: check if enabled 5 years ago
Michael Santos c5f0f7b662 reorg: presence error handler 5 years ago
Michael Santos 0b22ad4302 reorg: presence handler 5 years ago
Michael Santos 8b1374a25a reorg: move next_state to util 5 years ago
Michael Santos d150e63735 reorg: null handler 5 years ago
Michael Santos b3468de16f reorg: ping handler 5 years ago
Michael Santos 9a98b8b9bf reorg: version handler 5 years ago
Michael Santos 895ad40ee2 reorg: xmppipe_send* 6 years ago
Michael Santos a365e18b59 reorg: message: organize by handler 6 years ago
Michael Santos 990874ef2e Add support for printing groupchat subject 6 years ago
Michael Santos 4e660c641a --keepalive-failures: check minimum using strtonum() 6 years ago
Michael Santos b38d4b9e0c handle_message: use xmpp_free() 6 years ago
Michael Santos 026890d377 Add experimental support for chat markers
Support chat marker (XEP-0333) stanzas when the "--chat-marker" switch
is provided on the command line. A chat marker is prefixed by 'M':

~~~
M:groupchat:test@conference.example.com/msantos:me@example.com/162315501161646113068402:
~~~

The idea is to allow scripts to react based on whether a message has
been read, for example, escalating via other channels.
6 years ago
Michael Santos 501ada87ff chat: set default user to self 6 years ago
Michael Santos a10b4bd84c chat: fix segfault when checking origin
strcmp(3) segfaulted when comparing the from address to NULL.

Checking messages originated from the output account only makes sense
with groupchat. Remove the check for type of "chat".
6 years ago
Michael Santos 0a776e3441 Fix warning
src/xmppipe.c:69:19: warning: duplicate ‘const’ declaration specifier
[-Wduplicate-decl-specifier]
 static const char const *xmppipe_states[] = {
                   ^~~~~
6 years ago
Michael Santos a2d16c90c1 format: rename options
stdin -> text, colon -> csv
6 years ago
Michael Santos df6a7ee596 format: use separate function 6 years ago
Michael Santos ab6d1b3f79 format: clean up input parsing 6 years ago
Michael Santos 4d1423eb5e <Remove unused verbose log
Statement will never be called since verbose mode is set afterwards.
6 years ago
Michael Santos 06f50d4b11 Fix "-x/--base64" option 6 years ago