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
This commit is contained in:
@@ -9195,7 +9195,11 @@ cmd_avatar(ProfWin* window, const char* const command, gchar** args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "get") == 0) {
|
||||
if (g_strcmp0(args[0], "set") == 0) {
|
||||
if (avatar_set(args[1])) {
|
||||
cons_show("Avatar updated successfully");
|
||||
}
|
||||
} else if (g_strcmp0(args[0], "get") == 0) {
|
||||
avatar_get_by_nick(args[1], false);
|
||||
} else if (g_strcmp0(args[0], "open") == 0) {
|
||||
avatar_get_by_nick(args[1], true);
|
||||
|
||||
Reference in New Issue
Block a user