Compare commits
3 Commits
aeb5cfd7db
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
2be16df905
|
|||
|
c5dd0cf9df
|
|||
|
b34faa2099
|
44
.github/workflows/docker-publish.yml
vendored
Normal file
44
.github/workflows/docker-publish.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Publish Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
|
||||
with:
|
||||
images: cproofdev/cproof
|
||||
tags: |
|
||||
type=raw,value=dev,enable={{is_default_branch}}
|
||||
type=sha,prefix=nightly-,enable={{is_default_branch}}
|
||||
type=ref,event=tag
|
||||
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
id: push
|
||||
uses: docker/build-push-action@2bd26e71295ee32cbf6a73510d165bf7232460f3
|
||||
with:
|
||||
context: .
|
||||
file: ./ci/Dockerfile
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
106
ci/Dockerfile
Normal file
106
ci/Dockerfile
Normal file
@@ -0,0 +1,106 @@
|
||||
# =============================================================================
|
||||
# Stage 1: Build
|
||||
# =============================================================================
|
||||
FROM ubuntu:26.04 AS builder
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
autoconf \
|
||||
automake \
|
||||
autoconf-archive \
|
||||
ca-certificates \
|
||||
libtool \
|
||||
pkg-config \
|
||||
git \
|
||||
wget \
|
||||
libglib2.0-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libsqlite3-dev \
|
||||
libncurses-dev \
|
||||
libreadline-dev \
|
||||
libnotify-dev \
|
||||
python3-dev \
|
||||
python3 \
|
||||
libgpgme-dev \
|
||||
libotr5-dev \
|
||||
libgtk-3-dev \
|
||||
libgdk-pixbuf-2.0-dev \
|
||||
libsignal-protocol-c-dev \
|
||||
libgcrypt20-dev \
|
||||
libqrencode-dev \
|
||||
libxss-dev \
|
||||
libcmocka-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Build libstrophe from source (not available as Ubuntu package)
|
||||
RUN git clone --depth 1 https://git.jabber.space/devs/libstrophe-gh-mirror.git /tmp/libstrophe \
|
||||
&& cd /tmp/libstrophe \
|
||||
&& autoreconf -i \
|
||||
&& ./configure --prefix=/usr \
|
||||
&& make -j$(nproc) \
|
||||
&& make install \
|
||||
&& rm -rf /tmp/libstrophe
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN ./bootstrap.sh \
|
||||
&& ./configure \
|
||||
--enable-notifications \
|
||||
--enable-icons-and-clipboard \
|
||||
--enable-otr \
|
||||
--enable-pgp \
|
||||
--enable-omemo \
|
||||
--enable-plugins \
|
||||
--enable-c-plugins \
|
||||
--enable-python-plugins \
|
||||
--with-xscreensaver \
|
||||
--enable-omemo-qrcode \
|
||||
--enable-gdk-pixbuf \
|
||||
&& make -j$(nproc) \
|
||||
&& make install
|
||||
|
||||
# =============================================================================
|
||||
# Stage 2: Runtime (minimal)
|
||||
# =============================================================================
|
||||
FROM ubuntu:26.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
libglib2.0-0t64 \
|
||||
libcurl4t64 \
|
||||
libsqlite3-0 \
|
||||
libncursesw6 \
|
||||
libreadline8t64 \
|
||||
libnotify4 \
|
||||
python3 \
|
||||
libpython3.14 \
|
||||
libgpgme45 \
|
||||
libotr5t64 \
|
||||
libgtk-3-0t64 \
|
||||
libgdk-pixbuf-2.0-0 \
|
||||
libsignal-protocol-c2.3.2 \
|
||||
libgcrypt20 \
|
||||
libqrencode4 \
|
||||
libxss1 \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& apt-get clean
|
||||
|
||||
COPY --from=builder /usr/local/bin/profanity /usr/local/bin/profanity
|
||||
COPY --from=builder /usr/local/lib/libprofanity* /usr/local/lib/
|
||||
COPY --from=builder /usr/local/include/profapi.h /usr/local/include/
|
||||
COPY --from=builder /usr/local/share/profanity /usr/local/share/profanity
|
||||
COPY --from=builder /usr/lib/libstrophe.so* /usr/lib/
|
||||
|
||||
RUN ldconfig
|
||||
|
||||
RUN ldd /usr/local/bin/profanity | grep 'not found' && exit 1 || true
|
||||
|
||||
RUN mkdir -p /root/.config/profanity
|
||||
|
||||
ENTRYPOINT ["profanity"]
|
||||
@@ -277,8 +277,11 @@ caps_cache_clear(void)
|
||||
{
|
||||
g_hash_table_remove_all(jid_to_ver);
|
||||
g_hash_table_remove_all(jid_to_caps);
|
||||
cache = g_key_file_new();
|
||||
caps_prof_keyfile.keyfile = cache;
|
||||
if (caps_prof_keyfile.keyfile) {
|
||||
g_key_file_free(caps_prof_keyfile.keyfile);
|
||||
}
|
||||
caps_prof_keyfile.keyfile = g_key_file_new();
|
||||
cache = caps_prof_keyfile.keyfile;
|
||||
save_keyfile(&caps_prof_keyfile);
|
||||
}
|
||||
|
||||
|
||||
@@ -280,9 +280,13 @@ jid_fulljid_or_barejid(Jid* jid)
|
||||
gchar*
|
||||
jid_random_resource(void)
|
||||
{
|
||||
auto_gchar gchar* rand = get_random_string(5);
|
||||
gchar* rand = g_malloc0(29);
|
||||
const gchar* digits = "0123456789";
|
||||
|
||||
gchar* result = g_strdup_printf("%s", rand);
|
||||
for (int i = 0; i < 28; i++) {
|
||||
rand[i] = digits[g_random_int_range(0, 10)];
|
||||
}
|
||||
rand[28] = '\0';
|
||||
|
||||
return result;
|
||||
return rand;
|
||||
}
|
||||
|
||||
@@ -931,19 +931,22 @@ stanza_create_caps_query_element(xmpp_ctx_t* ctx)
|
||||
|
||||
xmpp_stanza_t* identity = xmpp_stanza_new(ctx);
|
||||
xmpp_stanza_set_name(identity, "identity");
|
||||
xmpp_stanza_set_attribute(identity, "category", "client");
|
||||
xmpp_stanza_set_type(identity, "pc");
|
||||
xmpp_stanza_set_attribute(identity, "category", "client");
|
||||
|
||||
ProfAccount* account = accounts_get_account(session_get_account_name());
|
||||
gchar* client = account->client;
|
||||
bool is_custom_client = client != NULL;
|
||||
|
||||
GString* name_str = g_string_new(is_custom_client ? client : "Pidgin");
|
||||
auto_gchar gchar* name = g_strdup(account->client ? account->client : "Pidgin");
|
||||
|
||||
if (account->client) {
|
||||
gchar* space = strchr(name, ' ');
|
||||
if (space) {
|
||||
*space = '\0';
|
||||
}
|
||||
}
|
||||
account_free(account);
|
||||
|
||||
xmpp_stanza_set_attribute(identity, "name", name_str->str);
|
||||
g_string_free(name_str, TRUE);
|
||||
xmpp_stanza_set_attribute(identity, "name", name);
|
||||
xmpp_stanza_add_child(query, identity);
|
||||
xmpp_stanza_release(identity);
|
||||
|
||||
@@ -1995,35 +1998,33 @@ static const char*
|
||||
_stanza_get_caps_node(const char* const client)
|
||||
{
|
||||
if (!client || g_strcmp0(client, "") == 0) {
|
||||
static const char* pidgin_node = "http://pidgin.im/";
|
||||
return pidgin_node;
|
||||
return "http://pidgin.im";
|
||||
}
|
||||
|
||||
auto_gchar gchar* lower = g_ascii_strdown(client, -1);
|
||||
|
||||
if (g_str_has_prefix(lower, "pidgin")) {
|
||||
static const char* pidgin_node = "http://pidgin.im/";
|
||||
return pidgin_node;
|
||||
return "http://pidgin.im";
|
||||
}
|
||||
|
||||
if (g_str_has_prefix(lower, "gajim")) {
|
||||
static const char* gajim_node = "https://gajim.org/";
|
||||
return gajim_node;
|
||||
return "https://gajim.org";
|
||||
}
|
||||
|
||||
if (g_str_has_prefix(lower, "conversations")) {
|
||||
static const char* conv_node = "https://conversations.im/";
|
||||
return conv_node;
|
||||
return "https://conversations.im";
|
||||
}
|
||||
|
||||
if (g_str_has_prefix(lower, "psi+")) {
|
||||
static const char* psip_node = "http://psi-plus.com/";
|
||||
return psip_node;
|
||||
return "http://psi-plus.com";
|
||||
}
|
||||
|
||||
if (g_str_has_prefix(lower, "psi")) {
|
||||
static const char* psi_node = "http://psi-im.org/";
|
||||
return psi_node;
|
||||
return "http://psi-im.org";
|
||||
}
|
||||
|
||||
if (g_str_has_prefix(lower, "profanity")) {
|
||||
return "http://profanity-im.github.io";
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
@@ -601,11 +601,11 @@ prof_connect_with_roster(const char* roster)
|
||||
assert_true(prof_output_regex(".+online.+ \\(priority 0\\)\\."));
|
||||
|
||||
expect_timeout = EXPECT_TIMEOUT_CONNECT;
|
||||
// Wait for presence stanza to be sent (content-based, not ID-based)
|
||||
// Wait for presence stanza to be sent
|
||||
// Match the actual attribute order from stanza_attach_caps
|
||||
assert_true(stbbr_received(
|
||||
"<presence id=\"*\">"
|
||||
"<c xmlns=\"http://jabber.org/protocol/caps\" hash=\"sha-1\" node=\"http://profanity-im.github.io\" ver=\"*\"/>"
|
||||
"<c xmlns=\"http://jabber.org/protocol/caps\" hash=\"sha-1\" node=\"*\" ver=\"*\"/>"
|
||||
"</presence>"));
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ connect_jid_sends_presence_after_receiving_roster(void **state)
|
||||
|
||||
assert_true(stbbr_received(
|
||||
"<presence id='*'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
|
||||
@@ -1289,7 +1289,7 @@ _join_muc(const char* room)
|
||||
snprintf(presence, sizeof(presence),
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='%s/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' "
|
||||
"node='http://profanity-im.github.io' ver='*'/>"
|
||||
"node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
|
||||
@@ -26,7 +26,7 @@ sends_room_join(void **state)
|
||||
assert_true(stbbr_received(
|
||||
"<presence id='*' to='testroom@conference.localhost/stabber'>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -41,7 +41,7 @@ sends_room_join_with_nick(void **state)
|
||||
assert_true(stbbr_received(
|
||||
"<presence id='*' to='testroom@conference.localhost/testnick'>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -58,7 +58,7 @@ sends_room_join_with_password(void **state)
|
||||
"<x xmlns='http://jabber.org/protocol/muc'>"
|
||||
"<password>testpassword</password>"
|
||||
"</x>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -75,7 +75,7 @@ sends_room_join_with_nick_and_password(void **state)
|
||||
"<x xmlns='http://jabber.org/protocol/muc'>"
|
||||
"<password>testpassword</password>"
|
||||
"</x>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -87,7 +87,7 @@ shows_role_and_affiliation_on_join(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
@@ -107,7 +107,7 @@ shows_subject_on_join(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
@@ -135,7 +135,7 @@ shows_history_message(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
@@ -170,7 +170,7 @@ shows_occupant_join(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
@@ -200,7 +200,7 @@ shows_message(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
@@ -227,7 +227,7 @@ shows_me_message_from_occupant(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
@@ -254,7 +254,7 @@ shows_me_message_from_self(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
@@ -281,7 +281,7 @@ shows_all_messages_in_console_when_window_not_focussed(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
@@ -322,7 +322,7 @@ shows_first_message_in_console_when_window_not_focussed(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
@@ -369,7 +369,7 @@ shows_no_message_in_console_when_window_not_focussed(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='participant' jid='stabber@localhost/profanity' affiliation='none'/>"
|
||||
"</x>"
|
||||
@@ -401,7 +401,7 @@ sends_affiliation_list_request(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='moderator' jid='stabber@localhost/profanity' affiliation='owner'/>"
|
||||
"</x>"
|
||||
@@ -434,7 +434,7 @@ sends_kick_request(void **state)
|
||||
|
||||
stbbr_for_presence_to("testroom@conference.localhost/stabber",
|
||||
"<presence id='*' lang='en' to='stabber@localhost/profanity' from='testroom@conference.localhost/stabber'>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='*'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' node='*' ver='*'/>"
|
||||
"<x xmlns='http://jabber.org/protocol/muc#user'>"
|
||||
"<item role='moderator' jid='stabber@localhost/profanity' affiliation='admin'/>"
|
||||
"</x>"
|
||||
|
||||
@@ -19,7 +19,7 @@ presence_online(void **state)
|
||||
assert_true(stbbr_received(
|
||||
"<presence id='*'>"
|
||||
"<status>online</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -36,7 +36,7 @@ presence_online_with_message(void **state)
|
||||
assert_true(stbbr_received(
|
||||
"<presence id='*'>"
|
||||
"<status>Hi there</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -54,7 +54,7 @@ presence_away(void **state)
|
||||
"<presence id='*'>"
|
||||
"<show>away</show>"
|
||||
"<status>away</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -72,7 +72,7 @@ presence_away_with_message(void **state)
|
||||
"<presence id='*'>"
|
||||
"<show>away</show>"
|
||||
"<status>I'm not here for a bit</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -90,7 +90,7 @@ presence_xa(void **state)
|
||||
"<presence id='*'>"
|
||||
"<show>xa</show>"
|
||||
"<status>xa</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -108,7 +108,7 @@ presence_xa_with_message(void **state)
|
||||
"<presence id='*'>"
|
||||
"<show>xa</show>"
|
||||
"<status>Gone to the shops</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -126,7 +126,7 @@ presence_dnd(void **state)
|
||||
"<presence id='*'>"
|
||||
"<show>dnd</show>"
|
||||
"<status>dnd</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -144,7 +144,7 @@ presence_dnd_with_message(void **state)
|
||||
"<presence id='*'>"
|
||||
"<show>dnd</show>"
|
||||
"<status>Working</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -162,7 +162,7 @@ presence_chat(void **state)
|
||||
"<presence id='*'>"
|
||||
"<show>chat</show>"
|
||||
"<status>chat</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -180,7 +180,7 @@ presence_chat_with_message(void **state)
|
||||
"<presence id='*'>"
|
||||
"<show>chat</show>"
|
||||
"<status>Free to talk</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -197,7 +197,7 @@ presence_set_priority(void **state)
|
||||
assert_true(stbbr_received(
|
||||
"<presence id='*'>"
|
||||
"<priority>25</priority>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -212,7 +212,7 @@ presence_includes_priority(void **state)
|
||||
assert_true(stbbr_received(
|
||||
"<presence id='*'>"
|
||||
"<priority>25</priority>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
|
||||
@@ -223,7 +223,7 @@ presence_includes_priority(void **state)
|
||||
"<priority>25</priority>"
|
||||
"<show>chat</show>"
|
||||
"<status>Free to talk</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
@@ -239,7 +239,7 @@ presence_keeps_status(void **state)
|
||||
"<presence id='*'>"
|
||||
"<show>chat</show>"
|
||||
"<status>Free to talk</status>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
|
||||
@@ -250,7 +250,7 @@ presence_keeps_status(void **state)
|
||||
"<show>chat</show>"
|
||||
"<status>Free to talk</status>"
|
||||
"<priority>25</priority>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='http://profanity-im.github.io'/>"
|
||||
"<c hash='sha-1' xmlns='http://jabber.org/protocol/caps' ver='*' node='*'/>"
|
||||
"</presence>"
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user