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
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
```
Update syscalls in seccomp policy for termux on android 12. With this
change, xmppipe works with the seccomp process restrictions on termux
but will still crash on exit:
* prctl(PR_SET_VMA): prctl(2) is not allowed by the stdin restrictions
* if prctl(2) is allowed, xmppipe aborts with "bad syscall" on exit. The
system call doesn't show up in strace(1).
~~~
In file included from src/restrict_process_capsicum.c:16: /usr/include/sys/capability.h:44:2: warning: this file includes <sys/capability.h> which is deprecated [-W#warnings]
^
1 warning generated.
~~~
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>"?
When using the csv input format, add a new format ('u') that wraps the
message in an "x:oob" element. The image will be displayed inline by
Conversations.
~~~
u:groupchat:::https%3A%2F%2Fhttpstatusdogs.com%2Fimg%2F500.jpg
~~~
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;