Add xep-0107: User Mood support

Implementation of XEP 0107 - User Mood
This commit is contained in:
DebXWoody
2021-10-16 08:43:55 +02:00
committed by Michael Vetter
parent 9a9122c148
commit 23e886ed5e
8 changed files with 240 additions and 1 deletions

View File

@@ -9645,3 +9645,18 @@ cmd_register(ProfWin* window, const char* const command, gchar** args)
log_info("we are leaving the registration process");
return TRUE;
}
gboolean
cmd_mood(ProfWin* window, const char* const command, gchar** args)
{
if (g_strcmp0(args[0], "set") == 0) {
cons_show("Your mood: %s", args[1]);
if (args[2]) {
publish_user_mood(args[1], args[2]);
} else {
publish_user_mood(args[1], args[1]);
}
}
return TRUE;
}