Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Client (and bot) library for GNU Jami in C++

License

NotificationsYou must be signed in to change notification settings

marty1885/jami-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A basic (enough to build a chatbot) and easy to use GNU Jami API library in C++17. The API is modeled afterreo7sp/tgbot-cpp

Dependencies

  • sdbus

Sample

#include<jami-cpp/jami-cpp.hpp>usingnamespacejamipp;intmain(){jamipp::init("jampp.example.echobot");auto account =jamipp::getAccountById("your-jami-id-here");assert(accont !=nullptr);    account->onNonCommandMessage([&account](Message::Ptr message) {if(message->type !="text/plain")return;        account->sendMessage(message->conversation_id, message->body);    });    account->onCommand("syn", [&account](Message::Ptr message) {        account->sendMessage(message->conversation_id,"syn/ack!");    });jamipp::run();}

TODOs:

  • Mark messages seen by the bot as read
  • Get display name of remote user
  • Allow refusing conversation request

About

Client (and bot) library for GNU Jami in C++

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp