about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorMarcoPolo-PasTonMolo <marcopolopastonmolo@protonmail.com>2022-05-26 17:49:34 +0300
committerMarcoPolo-PasTonMolo <marcopolopastonmolo@protonmail.com>2022-05-26 17:49:34 +0300
commit6a44e188537ee2d70226ad9dba4ae89c15437e2b (patch)
tree3081b0af49199c6f5b3a8fdc1ff07eac64420476 /tests
parentb4523d6c42825bda175663730001302adb21b95e (diff)
downloadprofani-tty-6a44e188537ee2d70226ad9dba4ae89c15437e2b.tar.gz
Add `/avatar set` command to publish avatar
Use `/avatar set <path>` where <path> is an image file to upload a new
avatar for the current user. When the avatar is too big it gets scaled
down. Scaling code copied from dino.

Fixes https://github.com/profanity-im/profanity/issues/1687
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/xmpp/stub_avatar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unittests/xmpp/stub_avatar.c b/tests/unittests/xmpp/stub_avatar.c
index ccd9cf4d..453d1863 100644
--- a/tests/unittests/xmpp/stub_avatar.c
+++ b/tests/unittests/xmpp/stub_avatar.c
@@ -8,3 +8,8 @@ avatar_get_by_nick(const char* nick)
 {
     return TRUE;
 }
+gboolean
+avatar_set(const char* path)
+{
+    return FALSE;
+}
d='n139' href='#n139'>139 140 141 142 143 144 145 146 147 148